Ignore:
Timestamp:
03/13/14 00:44:08 (11 years ago)
Author:
hendrikvanantwerpen
Message:
  • Added open item options to singe and multiple choice.
  • Question view widgets are forms again, because we needed the control.
  • Multiple and singel choice share their widgets.
  • QuestionEditorPreview? now has items that were already there close, but opens newly dropped items.
  • PreviewItems? will save modified value even when we change to view before the widget loses its focus (which causes a change event).
File:
1 edited

Legend:

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

    r506 r511  
    9292        },
    9393        focus: function() {
    94             var children = this._getDescendantFormWidgets();
     94            /*var children = this._getDescendantFormWidgets();
    9595            if ( children.length > 0 ) {
    9696                children[0].focus();
    97             }
     97            }*/
    9898        },
    9999        _handleChange: function(evt) {
    100100            if ( evt.target !== this.domNode ) {
    101                 if ( this._onChangeActive &&
    102                      !(this.readOnly || this.disabled) ) {
    103                     if ( this._onChangeHandle ) {
    104                         this._onChangeHandle.cancel();
    105                     }
    106                     this._onChangeHandle = this.defer(function(){
    107                         this._onChangeHandle = null;
    108                         on.emit(this.domNode,'change',{
    109                             target: this.domNode,
    110                             value: this.get('value'),
    111                             bubbles: true,
    112                             cancellable: true
    113                         });
    114                     });
    115                 }
     101                this._onChange();
    116102                if ( evt ) { event.stop(evt); }
    117103                return false;
     
    133119            if (evt) { event.stop(evt); }
    134120            return false;
     121        },
     122        _onChange: function() {
     123            if ( this._onChangeActive &&
     124                 !(this.readOnly || this.disabled) ) {
     125                if ( this._onChangeHandle ) {
     126                    this._onChangeHandle.cancel();
     127                }
     128                this._onChangeHandle = this.defer(function(){
     129                    this._onChangeHandle = null;
     130                    on.emit(this.domNode,'change',{
     131                        target: this.domNode,
     132                        value: this.get('value'),
     133                        bubbles: true,
     134                        cancellable: true
     135                    });
     136                });
     137            }
    135138        }
    136139    });
Note: See TracChangeset for help on using the changeset viewer.