commit
2440e7d637
|
@ -399,7 +399,9 @@ define([
|
||||||
_btns = data.buttons,
|
_btns = data.buttons,
|
||||||
_flex = data.flex;
|
_flex = data.flex;
|
||||||
var more_section = $active.find('.more-box');
|
var more_section = $active.find('.more-box');
|
||||||
|
if (more_section.length===0) {
|
||||||
|
me.setMoreButton($active.attr('data-tab'), $active);
|
||||||
|
}
|
||||||
if ( !_rightedge ) {
|
if ( !_rightedge ) {
|
||||||
_rightedge = $active.get(0).getBoundingClientRect().right;
|
_rightedge = $active.get(0).getBoundingClientRect().right;
|
||||||
}
|
}
|
||||||
|
@ -527,10 +529,30 @@ define([
|
||||||
this.$moreBar = btnsMore[tab].panel;
|
this.$moreBar = btnsMore[tab].panel;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
clearMoreButton: function(tab) {
|
||||||
|
var panel = this.$panels.filter('[data-tab=' + tab + ']');
|
||||||
|
if ( panel.length ) {
|
||||||
|
var data = panel.data();
|
||||||
|
data.buttons = data.flex = data.rightedge = undefined;
|
||||||
|
panel.find('.more-box').remove();
|
||||||
|
}
|
||||||
|
if (btnsMore[tab]) {
|
||||||
|
var moreContainer = optsFold.$bar.find('.more-container[data-tab="' + tab + '"]');
|
||||||
|
moreContainer.remove();
|
||||||
|
btnsMore[tab].remove();
|
||||||
|
delete btnsMore[tab];
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
resizeToolbar: function(reset) {
|
resizeToolbar: function(reset) {
|
||||||
var $active = this.$panels.filter('.active'),
|
var $active = this.$panels.filter('.active'),
|
||||||
more_section = $active.find('.more-box'),
|
more_section = $active.find('.more-box');
|
||||||
more_section_width = parseInt(more_section.css('width')) || 0,
|
|
||||||
|
if (more_section.length===0) {
|
||||||
|
this.setMoreButton($active.attr('data-tab'), $active);
|
||||||
|
}
|
||||||
|
|
||||||
|
var more_section_width = parseInt(more_section.css('width')) || 0,
|
||||||
box_controls_width = $active.parents('.box-controls').width(),
|
box_controls_width = $active.parents('.box-controls').width(),
|
||||||
_maxright = box_controls_width,
|
_maxright = box_controls_width,
|
||||||
_rightedge = $active.get(0).getBoundingClientRect().right,
|
_rightedge = $active.get(0).getBoundingClientRect().right,
|
||||||
|
|
|
@ -66,7 +66,7 @@ define([
|
||||||
if ( !appOptions.isEditMailMerge && !appOptions.isEditDiagram && !appOptions.isEditOle ) {
|
if ( !appOptions.isEditMailMerge && !appOptions.isEditDiagram && !appOptions.isEditOle ) {
|
||||||
var tab = {action: 'plugins', caption: me.panelPlugins.groupCaption, dataHintTitle: 'E', layoutname: 'toolbar-plugins'};
|
var tab = {action: 'plugins', caption: me.panelPlugins.groupCaption, dataHintTitle: 'E', layoutname: 'toolbar-plugins'};
|
||||||
me.$toolbarPanelPlugins = me.panelPlugins.getPanel();
|
me.$toolbarPanelPlugins = me.panelPlugins.getPanel();
|
||||||
|
me.toolbar = toolbar;
|
||||||
toolbar.addTab(tab, me.$toolbarPanelPlugins, 10); // TODO: clear plugins list in left panel
|
toolbar.addTab(tab, me.$toolbarPanelPlugins, 10); // TODO: clear plugins list in left panel
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -248,6 +248,7 @@ define([
|
||||||
me.appOptions.canPlugins = !collection.isEmpty();
|
me.appOptions.canPlugins = !collection.isEmpty();
|
||||||
if ( me.$toolbarPanelPlugins ) {
|
if ( me.$toolbarPanelPlugins ) {
|
||||||
me.$toolbarPanelPlugins.empty();
|
me.$toolbarPanelPlugins.empty();
|
||||||
|
me.toolbar && me.toolbar.clearMoreButton('plugins');
|
||||||
|
|
||||||
var _group = $('<div class="group"></div>'),
|
var _group = $('<div class="group"></div>'),
|
||||||
rank = -1,
|
rank = -1,
|
||||||
|
@ -274,6 +275,7 @@ define([
|
||||||
rank = new_rank;
|
rank = new_rank;
|
||||||
});
|
});
|
||||||
_group.appendTo(me.$toolbarPanelPlugins);
|
_group.appendTo(me.$toolbarPanelPlugins);
|
||||||
|
me.toolbar && me.toolbar.isTabActive('plugins') && me.toolbar.processPanelVisible(null, true, true);
|
||||||
var docProtection = me.panelPlugins._state.docProtection;
|
var docProtection = me.panelPlugins._state.docProtection;
|
||||||
Common.Utils.lockControls(Common.enumLock.docLockView, docProtection.isReadOnly, {array: me.panelPlugins.lockedControls});
|
Common.Utils.lockControls(Common.enumLock.docLockView, docProtection.isReadOnly, {array: me.panelPlugins.lockedControls});
|
||||||
Common.Utils.lockControls(Common.enumLock.docLockForms, docProtection.isFormsOnly, {array: me.panelPlugins.lockedControls});
|
Common.Utils.lockControls(Common.enumLock.docLockForms, docProtection.isFormsOnly, {array: me.panelPlugins.lockedControls});
|
||||||
|
|
Loading…
Reference in a new issue