Changeset 492 for Dev/trunk/src/client/qed-client/pages/question.js
- Timestamp:
- 03/09/14 14:23:42 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Dev/trunk/src/client/qed-client/pages/question.js
r490 r492 29 29 }, 30 30 _handlePropertiesChange: function() { 31 if ( this.propertiesForm.validate() ) { 32 lang.mixin(this.object,this.propertiesForm.get('value')); 33 } 31 lang.mixin(this.object,this.propertiesForm.get('value')); 34 32 this.markDirty(); 33 this._refresh(); 35 34 }, 36 35 _handleContentChange: function() { 37 if ( this.contentList.validate() ) { 38 this.object.content = this.contentList.get('value'); 39 } 36 this.object.content = this.contentList.get('value'); 40 37 this.markDirty(); 38 this._refresh(); 41 39 }, 42 40 _save: function() { 43 if ( this.propertiesForm.validate() && this.contentList.validate() ) { 44 lang.mixin(this.object,this.propertiesForm.get('value')); 45 this.object.content = this.contentList.get('value'); 41 if ( this._isValid ) { 46 42 return this.inherited(arguments); 47 43 } else { … … 68 64 return false; 69 65 }, 66 markDirty: function() { 67 this._isValid = this.propertiesForm.validate() && 68 this.contentList.validate(); 69 this.saveBtn.set('disabled',!this._isValid); 70 this.saveAndCloseBtn.set('disabled',!this._isValid); 71 this.discardBtn.set('label','Discard & Close'); 72 this.inherited(arguments); 73 }, 74 markClean: function() { 75 this._isValid = true; 76 this.saveBtn.set('disabled',true); 77 this.saveAndCloseBtn.set('disabled',true); 78 this.discardBtn.set('label','Close'); 79 this.inherited(arguments); 80 }, 70 81 _ignore: function(evt) { 71 82 if ( evt ) { event.stop( evt ); }
Note: See TracChangeset
for help on using the changeset viewer.