X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/07d6b62cad891ce2a51a60f81a6af00b73f3b9fe..7263e5132059abc0e93deac2175db475f90e7617:/src/fnpjs/actions.js?ds=sidebyside diff --git a/src/fnpjs/actions.js b/src/fnpjs/actions.js index f380ed6..b8aa033 100644 --- a/src/fnpjs/actions.js +++ b/src/fnpjs/actions.js @@ -72,9 +72,13 @@ _.extend(Action.prototype, Backbone.Events, { } 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); }