Ignore:
Timestamp:
03/11/14 00:41:43 (11 years ago)
Author:
hendrikvanantwerpen
Message:
  • ListWidget? can be disabled/readOnyl now.
  • Disable question and survey pages when published.
  • Removed weird dialog from survey page and just put a form there. Not very nice, but more consistent with the rest I would say.
File:
1 edited

Legend:

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

    r501 r502  
    2323         */
    2424        container: Source,
     25        _restoreParams: null,
    2526        _onChangeActive: false,
    2627        buildRendering: function() {
     
    5455            });
    5556            this.source = new this.container(this.domNode,sourceParams);
     57            this._restoreParams = {
     58                accept: this.source.accept,
     59                selfAccept: this.source.selfAccept,
     60                selfCopy: this.source.selfCopy,
     61                isSource: this.source.isSource
     62            };
    5663            this.own(this.source.on('Drop',
    5764                                    lang.hitch(this,'_handleDrop')));
     
    112119                child.set("disabled", value);
    113120            });
     121            this._updateContainer();
    114122        },
    115123        _setReadOnlyAttr: function(value) {
     
    118126                child.set("readOnly", value);
    119127            });
     128            this._updateContainer();
     129        },
     130        _updateContainer: function() {
     131            if ( this.disabled || this.readOnly ) {
     132                this.source.accept = [];
     133                this.source.selfAccept = false;
     134                this.source.selfCopy = false;
     135                this.source.isSource = false;
     136            } else {
     137                lang.mixin(this.source,this._restoreParams);
     138            }
    120139        },
    121140        focus: function() {
Note: See TracChangeset for help on using the changeset viewer.