editor: correct for changes in actions api
authorAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Wed, 2 Jul 2014 07:52:08 +0000 (09:52 +0200)
committerAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Fri, 18 Jul 2014 09:20:27 +0000 (11:20 +0200)
src/editor/modules/documentToolbar/actionView.js
src/editor/modules/documentToolbar/documentToolbar.js

index 74db332..5439045 100644 (file)
@@ -108,9 +108,7 @@ var ActionView = Backbone.View.extend({
         this.trigger('mousedown');
     },
     onExecute: function() {
         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),
     },
     onSelectionChange: function(e) {
         var select = $(e.target),
index 9ae5c94..6e3d630 100644 (file)
@@ -27,7 +27,7 @@ return function(sandbox) {
             });
 
             group.append(view.dom);
             });
 
             group.append(view.dom);
-            view.on('actionExecuted', function(action, ret) {
+            action.on('actionExecuted', function(ret) {
                 sandbox.publish('actionExecuted', action, ret);
             });
 
                 sandbox.publish('actionExecuted', action, ret);
             });