Changeset 492 for Dev/trunk/src/client/qed-client/pages/surveyRun.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/surveyRun.js
r490 r492 74 74 }, 75 75 _onPropChange: function(e) { 76 if ( this.surveyRunWidget.validate() ) { 77 lang.mixin(this.object,this.surveyRunWidget.get('value')); 76 if ( this._updateObject() ) { 78 77 this._refreshURL(); 79 78 } … … 90 89 }, 91 90 _save: function() { 92 if ( this.surveyRunWidget.validate() ) { 93 lang.mixin(this.object,this.surveyRunWidget.get('value')); 91 if ( this._updateObject() ) { 94 92 return this.inherited(arguments); 95 93 } else { 96 94 return new Deferred.reject(); 97 95 } 96 }, 97 _updateObject: function() { 98 var valid = this.surveyRunWidget.validate(); 99 if ( valid ) { 100 lang.mixin(this.object,this.surveyRunWidget.get('value')); 101 } 102 return valid; 98 103 }, 99 104 _onSave: function(evt) { … … 115 120 if ( evt ) { event.stop(evt); } 116 121 return false; 122 }, 123 markDirty: function() { 124 this.saveBtn.set('disabled',false); 125 this.saveAndCloseBtn.set('disabled',false); 126 this.discardBtn.set('label','Discard & Close'); 127 this.inherited(arguments); 128 }, 129 markClean: function() { 130 this.saveBtn.set('disabled',true); 131 this.saveAndCloseBtn.set('disabled',true); 132 this.discardBtn.set('label','Close'); 133 this.inherited(arguments); 117 134 } 118 135 });
Note: See TracChangeset
for help on using the changeset viewer.