- Timestamp:
- 03/11/14 01:00:40 (11 years ago)
- Location:
- Dev/trunk/src/client/qed-client
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
Dev/trunk/src/client/qed-client/model/widgets/QuestionEditorPreviewItem.js
r500 r503 33 33 lang.hitch(this, 'onToggleFold'))); 34 34 this.own(this.removeButton.on('click', 35 lang.hitch(this, ' onDestroy')));35 lang.hitch(this, '_handleDestroy'))); 36 36 this.own(this.editButton.on('click', 37 37 lang.hitch(this, 'onToggleEdit'))); 38 38 this.showEdit(); 39 39 }, 40 onDestroy: function() {}, 40 _handleDestroy: function(evt) { 41 if ( !( this.disabled || this.readOnly ) ) { 42 this.emit('destroy'); 43 } 44 if ( evt ) { event.stop(evt); } 45 return false; 46 }, 41 47 _getValueAttr: function(value) { 42 48 if ( this._editing ) { … … 102 108 this.innerWidget = newWidget; 103 109 this.addChild(this.innerWidget); 110 this.innerWidget.set('readOnly',this.readOnly); 111 this.innerWidget.set('disabled',this.disabled); 104 112 this.titleNode.innerHTML = this.value.type+" [editing]"; 105 113 domClass.replace(this.editButton.iconNode, "rftIconAccept", "rftIconEdit"); -
Dev/trunk/src/client/qed-client/model/widgets/QuestionListView.js
r490 r503 23 23 actions: { 24 24 "Remove" : { 25 callback: lang.hitch(this, ' removeItem', id, true),25 callback: lang.hitch(this, '_handleRemove', id), 26 26 properties: { 27 27 blockButton: false, … … 44 44 w.startup(); 45 45 return w; 46 }, 47 _handleRemove: function(id) { 48 if ( !( this.readOnly || this.disabled ) ) { 49 this.removeItem(id,true); 50 } 46 51 } 47 52 }); -
Dev/trunk/src/client/qed-client/pages/question.js
r502 r503 30 30 if ( this.object.publicationDate ) { 31 31 this.QuestionEditorToolkit.set('readOnly',true); 32 this.QuestionEditorToolkit.set('disabled',true);33 32 this.contentList.set('readOnly',true); 34 this.contentList.set('disabled',true);35 33 } 36 34 }, -
Dev/trunk/src/client/qed-client/pages/response.js
r492 r503 43 43 this.response._surveyRun.respondentCanDeleteOwnResponse); 44 44 this.cancelButton.set('disabled',canDelete||false); 45 this.surveyWidget.set(' disabled', false);45 this.surveyWidget.set('readOnly', false); 46 46 }, 47 47 _disableSubmit: function() { … … 49 49 this.continueButton.set('disabled',true); 50 50 this.cancelButton.set('disabled',true); 51 this.surveyWidget.set(' disabled', true);51 this.surveyWidget.set('readOnly', true); 52 52 }, 53 53 _showInfo: function(html) { -
Dev/trunk/src/client/qed-client/pages/survey.js
r502 r503 70 70 if ( this.object.publicationDate ) { 71 71 this.propertiesForm.set('readOnly',true); 72 this.propertiesForm.set('disabled',true);73 72 this.questionList.set('readOnly',true); 74 this.questionList.set('disabled',true);75 73 } 76 74 },
Note: See TracChangeset
for help on using the changeset viewer.