[SSE] Disable plugins panel when selecting cells range or editing formulas.

This commit is contained in:
Julia Radzhabova 2016-07-05 17:12:45 +03:00
parent 280ba9e1cb
commit fcecb0c62a
3 changed files with 24 additions and 1 deletions

View file

@ -66,7 +66,8 @@ define([
'</div>',
'<div id="current-plugin-frame" class="">',
'</div>',
'</div>'
'</div>',
'<div id="plugins-mask" style="display: none;">'
].join('')),
initialize: function(options) {
@ -104,6 +105,7 @@ define([
this.pluginName = $('#current-plugin-header label');
this.pluginsPanel = $('#plugins-box');
this.pluginsMask = $('#plugins-mask');
this.currentPluginPanel = $('#current-plugin-box');
this.pluginMenu = new Common.UI.Menu({
@ -129,6 +131,8 @@ define([
_.each(this.lockedControls, function(item) {
item.setDisabled(disable);
});
this.pluginsMask.css('display', disable ? 'block' : 'none');
}
},

View file

@ -106,3 +106,14 @@
padding-top: 38px;
}
}
#plugins-mask {
position: absolute;
top: 0;
left: 40px;
width: 100%;
height: 100%;
opacity: 0.4;
background-color: @gray-light;
z-index: @zindex-tooltip + 1;
}

View file

@ -659,6 +659,10 @@ define([
this.leftMenu.btnFile.setDisabled(isRangeSelection);
this.leftMenu.btnAbout.setDisabled(isRangeSelection);
this.leftMenu.btnSearch.setDisabled(isRangeSelection);
if (this.mode.canPlugins && this.leftMenu.panelPlugins) {
this.leftMenu.panelPlugins.setLocked(isRangeSelection);
this.leftMenu.panelPlugins.disableControls(isRangeSelection);
}
},
onApiEditCell: function(state) {
@ -668,6 +672,10 @@ define([
this.leftMenu.btnFile.setDisabled(isEditFormula);
this.leftMenu.btnAbout.setDisabled(isEditFormula);
this.leftMenu.btnSearch.setDisabled(isEditFormula);
if (this.mode.canPlugins && this.leftMenu.panelPlugins) {
this.leftMenu.panelPlugins.setLocked(isEditFormula);
this.leftMenu.panelPlugins.disableControls(isEditFormula);
}
},
textNoTextFound : 'Text not found',