Changeset 504


Ignore:
Timestamp:
03/11/14 11:51:09 (11 years ago)
Author:
hendrikvanantwerpen
Message:

Hide close button, don't just stop acting on it.

File:
1 edited

Legend:

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

    r503 r504  
    3939        },
    4040        _handleDestroy: function(evt) {
    41             if ( !( this.disabled || this.readOnly ) ) {
    42                 this.emit('destroy');
    43             }
     41            this.emit('destroy');
    4442            if ( evt ) { event.stop(evt); }
    4543            return false;
     
    5755            } else {
    5856                this._showViewWidget();
     57            }
     58        },
     59        _setReadOnlyAttr: function() {
     60            this.inherited(arguments);
     61            this._updateRemoveBtn();
     62        },
     63        _setDisabledAttr: function() {
     64            this.inherited(arguments);
     65            this._updateRemoveBtn();
     66        },
     67        _updateRemoveBtn: function() {
     68            if ( this.readOnly || this.disabled ) {
     69                domClass.add(this.removeButton.domNode, 'dijitHidden');
     70            } else {
     71                domClass.remove(this.removeButton.domNode, 'dijitHidden');
    5972            }
    6073        },
Note: See TracChangeset for help on using the changeset viewer.