From: Aleksander Ɓukasz Date: Wed, 2 Jul 2014 07:52:08 +0000 (+0200) Subject: editor: correct for changes in actions api X-Git-Url: https://git.mdrn.pl/fnpeditor.git/commitdiff_plain/215fc305d1a0d964f0b90f67438aecb333c8cd76 editor: correct for changes in actions api --- diff --git a/src/editor/modules/documentToolbar/actionView.js b/src/editor/modules/documentToolbar/actionView.js index 74db332..5439045 100644 --- a/src/editor/modules/documentToolbar/actionView.js +++ b/src/editor/modules/documentToolbar/actionView.js @@ -108,9 +108,7 @@ var ActionView = Backbone.View.extend({ 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), diff --git a/src/editor/modules/documentToolbar/documentToolbar.js b/src/editor/modules/documentToolbar/documentToolbar.js index 9ae5c94..6e3d630 100644 --- a/src/editor/modules/documentToolbar/documentToolbar.js +++ b/src/editor/modules/documentToolbar/documentToolbar.js @@ -27,7 +27,7 @@ return function(sandbox) { }); group.append(view.dom); - view.on('actionExecuted', function(action, ret) { + action.on('actionExecuted', function(ret) { sandbox.publish('actionExecuted', action, ret); });