Changeset 356
- Timestamp:
- 07/12/12 12:48:00 (13 years ago)
- Location:
- Dev/branches/rest-dojo-ui/client/rft/ui
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
Dev/branches/rest-dojo-ui/client/rft/ui/LineWithActionsWidget.js
r355 r356 41 41 iconClass: 'rftIcon rftIcon'+this.actions[action].properties.icon, 42 42 title: action, 43 onClick: lang.hitch(this, function(e){44 lang.hitch(this, this.actions[ac tion].callback )(e);43 onClick: lang.hitch(this, dojo.partial(function(ac, e){ 44 lang.hitch(this, this.actions[ac].callback )(e); 45 45 event.stop(e); 46 46 return false; 47 } )47 }, action)) 48 48 }, this.actions[action].properties); 49 properties["class"] = properties.modifiers; 50 new Button(properties).placeAt(this.buttonsNode); 51 } else { 52 properties = lang.mixin({ 53 baseClass: 'rftInlineButton', 54 modifiers: 'black', 55 label: "Default", 56 showLabel: false, 57 iconClass: 'rftIcon rftIcon'+this.actions[action].properties.icon, 58 title: action, 59 onClick: lang.hitch(this, function(e){ 60 lang.hitch(this, this.actions[action].callback)(e); 61 event.stop(e); 62 return false; 63 }) 64 }, this.actions[action].properties); 65 properties["class"] = properties.modifiers; 66 new Button(properties).placeAt(this.buttonsNode); 49 properties["class"] = properties.modifiers; 50 new Button(properties).placeAt(this.buttonsNode); 51 } else { 52 properties = lang.mixin({ 53 baseClass: 'rftInlineButton', 54 modifiers: 'black', 55 label: "Default", 56 showLabel: false, 57 iconClass: 'rftIcon rftIcon'+this.actions[action].properties.icon, 58 title: action, 59 onClick: lang.hitch(this, dojo.partial(function(ac, e){ 60 lang.hitch(this, this.actions[ac].callback)(e); 61 event.stop(e); 62 return false; 63 }, action)) 64 }, this.actions[action].properties); 65 properties["class"] = properties.modifiers; 66 new Button(properties).placeAt(this.buttonsNode); 67 } 67 68 } 69 }, 70 refresh: function() { 71 this.titleNode.innerHTML = this.title; 72 }, 73 _onClick: function(e){ 74 var preventDefault = this.onClick(e) === false; 75 if (preventDefault) { 76 event.stop(e); 77 } 78 return !preventDefault; 79 }, 80 onClick: function(e) { 81 }, 82 _setTitleAttr: function(value){ 83 this.title = value; 84 this.refresh(); 68 85 } 69 }, 70 refresh: function() { 71 this.titleNode.innerHTML = this.title; 72 }, 73 _onClick: function(e){ 74 var preventDefault = this.onClick(e) === false; 75 if (preventDefault) { 76 event.stop(e); 77 } 78 return !preventDefault; 79 }, 80 onClick: function(e) { 81 }, 82 _setTitleAttr: function(value){ 83 this.title = value; 84 this.refresh(); 85 } 86 }); 86 }); 87 87 }); -
Dev/branches/rest-dojo-ui/client/rft/ui/SurveyListView.js
r355 r356 88 88 actions: { 89 89 "Remove" : { 90 callback: lang.hitch(listView, function( ){91 source.removeItem(evt);90 callback: lang.hitch(listView, function(evt){ 91 this.removeItem(evt); 92 92 }), 93 93 properties: { … … 151 151 }, 152 152 removeItem: function(evt){ 153 153 debugger; 154 154 } 155 155 });
Note: See TracChangeset
for help on using the changeset viewer.