diff --git a/apps/common/main/lib/component/Mixtbar.js b/apps/common/main/lib/component/Mixtbar.js
index 5095bb25f..0f351ee5b 100644
--- a/apps/common/main/lib/component/Mixtbar.js
+++ b/apps/common/main/lib/component/Mixtbar.js
@@ -92,6 +92,10 @@ define([
config.tabs = options.tabs;
$(document.body).on('click', onClickDocument.bind(this));
+
+ Common.NotificationCenter.on('tab:visible', _.bind(function(action, visible){
+ this.setVisible(action, visible)
+ }, this));
},
afterRender: function() {
@@ -253,7 +257,7 @@ define([
return config.tabs[index].action;
}
- var _tabTemplate = _.template('
<%= caption %>');
+ var _tabTemplate = _.template('<%= caption %>');
config.tabs[after + 1] = tab;
var _after_action = _get_tab_action(after);
@@ -315,6 +319,11 @@ define([
}
}
}
+ },
+
+ setVisible: function (tab, visible) {
+ if ( tab && this.$tabs )
+ this.$tabs.find('> a[data-tab=' + tab + ']').parent().css('display', visible ? '' : 'none');
}
};
}()));
diff --git a/apps/common/main/lib/controller/Plugins.js b/apps/common/main/lib/controller/Plugins.js
index 7513c4b94..5e544d17a 100644
--- a/apps/common/main/lib/controller/Plugins.js
+++ b/apps/common/main/lib/controller/Plugins.js
@@ -57,6 +57,8 @@ 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 ) {
@@ -173,6 +175,8 @@ define([
arr.push(plugin);
});
this.api.asc_pluginsRegister('', arr);
+ if (this.toolbar && storePlugins.length>0)
+ this.toolbar.setVisible('plugins', true);
},
onAddPlugin: function (model) {
diff --git a/apps/common/main/lib/view/ReviewChanges.js b/apps/common/main/lib/view/ReviewChanges.js
index 852e57d28..71ef4c32c 100644
--- a/apps/common/main/lib/view/ReviewChanges.js
+++ b/apps/common/main/lib/view/ReviewChanges.js
@@ -662,6 +662,8 @@ define([
me.btnDocLang.updateHint(me.tipSetDocLang);
me.btnSetSpelling.updateHint(me.tipSetSpelling);
+ Common.NotificationCenter.trigger('tab:visible', 'review', true);
+
setEvents.call(me);
});
},