Ignore:
Timestamp:
03/19/14 21:33:13 (11 years ago)
Author:
hendrikvanantwerpen
Message:
  • Allow empty subcodes.
  • Use HTTPResult exclusively on server (no more q).
  • Set readonly & disabled on ourselves as well in _ComplexValueMixin
  • Split server into several modules.
  • Check codes on the variable level, not question level.
  • We can add modules in design documents now.
Location:
Dev/trunk/src/client/qed-client/widgets
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Dev/trunk/src/client/qed-client/widgets/ListWidget.js

    r513 r525  
    9898        _getValueAttr: function() {
    9999            return array.map(
    100                 this._getDescendantFormWidgets(),
    101                 function(child) { return child.get('value'); }
    102                 ,this);
     100                this.source.getAllNodes(),
     101                lang.hitch(this,function(node){
     102                    var widget = registry.byNode(node);
     103                    if ( widget && 'value' in widget ) {
     104                        return widget.get('value');
     105                    } else {
     106                        return this.source.getItem(node.id).data;
     107                    }
     108                }));
    103109        },
    104110        _setValueAttr: function(value,priorityChange) {
  • Dev/trunk/src/client/qed-client/widgets/_ComplexValueMixin.js

    r513 r525  
    6464                    if (typeof widgets[0].checked === 'boolean') {
    6565                        array.forEach(widgets, function(w){
    66                             w.set('value', array.indexOf(values, w._get('value')) !== -1, priorityChange);
     66                            w.set('value',
     67                                  array.indexOf(values,w._get('value'))!==-1,
     68                                  priorityChange);
    6769                        });
    6870                    } else if (widgets[0].multiple) {
     
    9092        _setDisabledAttr: function(disabled) {
    9193            this.inherited(arguments);
     94            this._set('disabled',disabled);
    9295            array.forEach(
    9396                this._getDescendantFormWidgets(),
     
    98101        _setReadOnlyAttr: function(readOnly) {
    99102            this.inherited(arguments);
     103            this._set('readOnly',readOnly);
    100104            array.forEach(
    101105                this._getDescendantFormWidgets(),
Note: See TracChangeset for help on using the changeset viewer.