Ignore:
Timestamp:
03/09/14 19:25:40 (11 years ago)
Author:
hendrikvanantwerpen
Message:
  • _ComplexValueMixin propagates priorityChange to children.
  • Deserialize updated docs after save too.
  • Validate to false if definitions are missing.
Location:
Dev/trunk/src/client/qed-client/model/widgets/questions
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • Dev/trunk/src/client/qed-client/model/widgets/questions/MultipleChoiceInputConfigWidget.js

    r490 r493  
    5252        _getValueAttr: function() {
    5353            var value = this.inherited(arguments);
    54             value.allowMultiple = value.allowMultiple && value.allowMultiple.length > 0;
     54            value.allowMultiple = value.allowMultiple.length > 0;
    5555            value.type = this.type;
    5656            return value;
    57         },
    58         _setValueAttr: function(value) {
    59             value.allowMultiple = value.allowMultiple === true ? ["on"] : [];
    60             this.inherited(arguments);
    6157        },
    6258        onAddItem: function(evt) {
  • Dev/trunk/src/client/qed-client/model/widgets/questions/NumberInputConfigWidget.js

    r443 r493  
    1010            var value = this.inherited(arguments);
    1111            value.type = this.type;
     12            if ( !value.min ) { delete value.min; }
     13            if ( !value.max ) { delete value.max; }
     14            if ( !value.places ) { delete value.places; }
    1215            return value;
    1316        }
  • Dev/trunk/src/client/qed-client/model/widgets/questions/TextInputConfigWidget.js

    r443 r493  
    1010            var value = this.inherited(arguments);
    1111            value.type = this.type;
     12            if ( !value.maxLength ) { delete value.maxLength; }
    1213            return value;
    1314        }
  • Dev/trunk/src/client/qed-client/model/widgets/questions/templates/MultipleChoiceInputConfigRowWidget.html

    r461 r493  
    11<form>
    2   <div data-dojo-type="dijit/form/ValidationTextBox" name="text" required="required" data-dojo-attach-point="textBox"></div><div data-dojo-type="dijit/form/Button" data-dojo-attach-event="onClick:onDestroy">X</div>
     2  <div data-dojo-type="dijit/form/ValidationTextBox"
     3       name="text" required="required"
     4       data-dojo-attach-point="textBox"></div>
     5  <div data-dojo-type="dijit/form/Button"
     6       data-dojo-attach-event="onClick:onDestroy">X</div>
    37</form>
  • Dev/trunk/src/client/qed-client/model/widgets/questions/templates/MultipleChoiceInputConfigWidget.html

    r461 r493  
    66  <div data-dojo-attach-point="itemsNode">
    77  </div>
    8   <div data-dojo-type="dijit/form/Button" data-dojo-attach-event="onClick:onAddItem">Add item</div>
     8  <div data-dojo-type="dijit/form/Button"
     9       data-dojo-attach-event="onClick:onAddItem">Add item</div>
    910</form>
Note: See TracChangeset for help on using the changeset viewer.