Changeset 502 for Dev/trunk/src/client/qed-client/pages/survey.js
- Timestamp:
- 03/11/14 00:41:43 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Dev/trunk/src/client/qed-client/pages/survey.js
r500 r502 24 24 this._setupListView(); 25 25 this.own(this.questionList.on('change',lang.hitch(this,'_handleQuestionsChange'))); 26 this.own(this.propertiesForm.on('change',lang.hitch(this,'_handlePropertiesChange'))); 26 27 this._load(); 27 28 }, … … 67 68 } 68 69 this.titleNode.innerHTML = this.object.title || "(set title in properties)"; 70 if ( this.object.publicationDate ) { 71 this.propertiesForm.set('readOnly',true); 72 this.propertiesForm.set('disabled',true); 73 this.questionList.set('readOnly',true); 74 this.questionList.set('disabled',true); 75 } 69 76 }, 70 77 _includeQuestion: function(question) { … … 76 83 this._refresh(); 77 84 }, 78 _onShowProperties: function(evt) { 79 this.propertiesDialog.show(); 80 if ( evt ) { event.stop(evt); } 81 return false; 82 }, 83 _onPropertiesOk: function(evt) { 84 this.propertiesDialog.hide(); 85 _handlePropertiesChange: function() { 85 86 lang.mixin(this.object, this.propertiesForm.get('value').survey); 86 87 this.markDirty(); 87 88 this._refresh(); 88 if ( evt ) { event.stop(evt); } 89 return false; 90 }, 91 _onPropertiesCancel: function(evt) { 92 this.propertiesDialog.hide(); 93 this.propertiesForm.set('value',{survey:this.object}); 94 if ( evt ) { event.stop(evt); } 95 return false; 89 this.layout(); 96 90 }, 97 91 _onSave: function(evt) { … … 128 122 this.discardBtn.set('label','Close'); 129 123 this.inherited(arguments); 124 }, 125 _ignore: function(evt) { 126 event.stop(evt); 127 return false; 130 128 } 131 129 });
Note: See TracChangeset
for help on using the changeset viewer.