From 215fc305d1a0d964f0b90f67438aecb333c8cd76 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Aleksander=20=C5=81ukasz?= Date: Wed, 2 Jul 2014 09:52:08 +0200 Subject: [PATCH] editor: correct for changes in actions api --- src/editor/modules/documentToolbar/actionView.js | 4 +--- src/editor/modules/documentToolbar/documentToolbar.js | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) 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); }); -- 2.20.1