From 7bd9a2ff7f0d2bfbee96f36fdc21a8a46d211a93 Mon Sep 17 00:00:00 2001 From: JuliaSvinareva Date: Thu, 21 Sep 2023 00:17:48 +0300 Subject: [PATCH] [DE PE SSE] Fix background plugins --- apps/common/main/lib/controller/Plugins.js | 59 +++++++++++-------- apps/common/main/lib/view/Plugins.js | 6 +- apps/common/main/resources/less/toolbar.less | 6 +- .../main/resources/less/app.less | 1 + .../main/resources/less/app.less | 1 + 5 files changed, 43 insertions(+), 30 deletions(-) diff --git a/apps/common/main/lib/controller/Plugins.js b/apps/common/main/lib/controller/Plugins.js index a2758f3a3e..b165d47728 100644 --- a/apps/common/main/lib/controller/Plugins.js +++ b/apps/common/main/lib/controller/Plugins.js @@ -265,23 +265,34 @@ define([ }, turnOffBackgroundPlugin: function (guid) { - var switcher; - this.backgroundPluginsSwitchers.forEach(function (item) { - if (item.options.pluginGuid === guid) { - switcher = item; + if (this.backgroundPluginsSwitchers) { + var switcher; + this.backgroundPluginsSwitchers.forEach(function (item) { + if (item.options.pluginGuid === guid) { + switcher = item; + } + }); + if (switcher) { + switcher.updateHint(this.viewPlugins.textStart); + switcher.setValue(false); + return true; } - }); - if (switcher) { - switcher.updateHint(this.viewPlugins.textStart); - switcher.setValue(false); - return true; + return false; } - return false; }, onShowBeforeBackgroundPlugins: function (menu) { var me = this; me.clickInsideMenu = false; + var hideActiveMenu = function () { + var activeMenu = menu.cmpEl.find('.dropdown-toggle.active'); + for (var i=0; i' + this.textTheListOfBackgroundPlugins + ''), stopPropagation: true } - ] + ], + restoreHeight: true }), hint: this.textBackgroundPlugins, - //lock: model.get('isDisplayedInViewer') ? [_set.viewMode, _set.previewReviewMode, _set.viewFormMode, _set.selRangeEdit, _set.editFormula] : [_set.viewMode, _set.previewReviewMode, _set.viewFormMode, _set.docLockView, _set.docLockForms, _set.docLockComments, _set.selRangeEdit, _set.editFormula ], + lock: [_set.viewMode, _set.previewReviewMode, _set.viewFormMode, _set.docLockView, _set.docLockForms, _set.docLockComments, _set.selRangeEdit, _set.editFormula], dataHint: '1', dataHintDirection: 'bottom', dataHintOffset: 'small' diff --git a/apps/common/main/resources/less/toolbar.less b/apps/common/main/resources/less/toolbar.less index b0f0b8dc99..0b849fc9fe 100644 --- a/apps/common/main/resources/less/toolbar.less +++ b/apps/common/main/resources/less/toolbar.less @@ -999,12 +999,12 @@ section .field-styles { .menu-header { display: block; font-weight: bold; - padding: 10px 20px; + padding: 10px 16px; } > li > .menu-item { display: flex; align-items: center; - padding: 10px 20px; + padding: 8px 16px; .menu-item-icon { float: none; margin: 0; @@ -1014,10 +1014,12 @@ section .field-styles { } .plugin-caption { flex-basis: 100%; + padding-top: 3px; } .plugin-tools { display: flex; .float-right(); + padding-top: 2px; .plugin-toggle { display: flex; align-items: center; diff --git a/apps/presentationeditor/main/resources/less/app.less b/apps/presentationeditor/main/resources/less/app.less index d50344bb01..44de087c00 100644 --- a/apps/presentationeditor/main/resources/less/app.less +++ b/apps/presentationeditor/main/resources/less/app.less @@ -114,6 +114,7 @@ @import "../../../../common/main/resources/less/scroller.less"; @import "../../../../common/main/resources/less/synchronize-tip.less"; @import "../../../../common/main/resources/less/common.less"; +@import "../../../../common/main/resources/less/switcher.less"; @import "../../../../common/main/resources/less/opendialog.less"; @import "../../../../common/main/resources/less/plugins.less"; @import "../../../../common/main/resources/less/toolbar.less"; diff --git a/apps/spreadsheeteditor/main/resources/less/app.less b/apps/spreadsheeteditor/main/resources/less/app.less index 888ab18645..54a477fde7 100644 --- a/apps/spreadsheeteditor/main/resources/less/app.less +++ b/apps/spreadsheeteditor/main/resources/less/app.less @@ -115,6 +115,7 @@ @import "../../../../common/main/resources/less/synchronize-tip.less"; @import "../../../../common/main/resources/less/tabbar.less"; @import "../../../../common/main/resources/less/common.less"; +@import "../../../../common/main/resources/less/switcher.less"; @import "../../../../common/main/resources/less/opendialog.less"; @import "../../../../common/main/resources/less/plugins.less"; @import "../../../../common/main/resources/less/toolbar.less";