prevent empty span in a new node
[fnpeditor.git] / src / fnpjs / actions.js
index c49373a..b8aa033 100644 (file)
@@ -74,8 +74,13 @@ _.extend(Action.prototype, Backbone.Events, {
     },
     execute: function() {
         var state = this.getState();
     },
     execute: function() {
         var state = this.getState();
+        
+        var callback = function(ret) {
+            this.trigger('actionExecuted', ret);
+        }.bind(this);
+
         if(state.allowed) {
         if(state.allowed) {
-            return state.execute.call(this, this.params, this.appObject);
+            return state.execute.call(this, callback, this.params, this.appObject);
         }
         throw new Error('Execution not allowed');
     }
         }
         throw new Error('Execution not allowed');
     }