From 7af4bc9d7be2fc22869ea46728e3bb800e369b9d Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Wed, 1 Nov 2017 12:03:37 +0300 Subject: [PATCH] Plugins refactoring. --- apps/common/main/lib/controller/Plugins.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/apps/common/main/lib/controller/Plugins.js b/apps/common/main/lib/controller/Plugins.js index 0acad9dcd..f783c7898 100644 --- a/apps/common/main/lib/controller/Plugins.js +++ b/apps/common/main/lib/controller/Plugins.js @@ -57,8 +57,6 @@ define([ this.addListeners({ 'Toolbar': { 'render:before' : function (toolbar) { - me.toolbar = toolbar; - var appOptions = me.getApplication().getController('Main').appOptions; if ( appOptions.isEdit && !appOptions.isEditMailMerge && !appOptions.isEditDiagram ) { @@ -175,8 +173,8 @@ define([ arr.push(plugin); }); this.api.asc_pluginsRegister('', arr); - if (this.toolbar && storePlugins.length>0) - this.toolbar.setVisible('plugins', true); + if (storePlugins.length>0) + Common.NotificationCenter.trigger('tab:visible', 'plugins', true); }, onAddPlugin: function (model) {