this.trigger('mousedown');
},
onExecute: function() {
- this.action.execute(function(ret) {
- this.trigger('actionExecuted', this.action, ret);
- }.bind(this));
+ this.action.execute();
},
onSelectionChange: function(e) {
var select = $(e.target),
});
group.append(view.dom);
- view.on('actionExecuted', function(action, ret) {
+ action.on('actionExecuted', function(ret) {
sandbox.publish('actionExecuted', action, ret);
});
}
return this._cache;
},
- execute: function(callback) {
+ execute: function() {
var state = this.getState();
- callback = callback || function() {};
+
+ var callback = function(ret) {
+ this.trigger('actionExecuted', ret);
+ }.bind(this);
+
if(state.allowed) {
return state.execute.call(this, callback, this.params, this.appObject);
}