Changeset 495 for Dev/trunk/src/client/qed-client/pages/questions.js
- Timestamp:
- 03/10/14 00:47:38 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Dev/trunk/src/client/qed-client/pages/questions.js
r490 r495 19 19 'class': 'orange', 20 20 dndType: null, 21 itemActions: { 22 Delete: { 23 callback: lang.hitch(this,"onDeleteQuestion"), 24 icon: 'Delete', 25 description: 'Delete question' 26 }, 27 Edit: { 28 callback: lang.hitch(this,"onEditQuestion"), 29 icon: 'Edit', 30 description: 'Edit question' 31 }, 32 Publish: { 33 callback: lang.hitch(this,"onPublishQuestion"), 34 icon: 'Publish', 35 description: 'Publish question' 21 getItemActions: lang.hitch(this,function(item) { 22 var actions = { 23 Edit: { 24 callback: lang.hitch(this,"onEditQuestion"), 25 icon: 'Edit', 26 description: 'Edit question' 27 } 28 }; 29 if ( !item.publicationDate ) { 30 lang.mixin(actions,{ 31 Delete: { 32 callback: lang.hitch(this,"onDeleteQuestion"), 33 icon: 'Delete', 34 description: 'Delete question' 35 }, 36 Publish: { 37 callback: lang.hitch(this,"onPublishQuestion"), 38 icon: 'Publish', 39 description: 'Publish question' 40 } 41 }); 36 42 } 37 } 43 return actions; 44 }) 38 45 },this.questionBrowser); 39 46 this.questionBrowser.startup(); … … 45 52 questions.remove(question) 46 53 .then(lang.hitch(this,function(){ 54 this.questionBrowser.removeItem(question); 47 55 this.notify("Question deleted."); 48 56 }),lang.hitch(this,function(err){
Note: See TracChangeset
for help on using the changeset viewer.