diff --git a/apps/api/documents/api.js b/apps/api/documents/api.js index f65749cb9..2727e702e 100644 --- a/apps/api/documents/api.js +++ b/apps/api/documents/api.js @@ -145,12 +145,43 @@ reviewDisplay: 'original', // original for viewer, markup for editor trackChanges: undefined // true/false - open editor with track changes mode on/off, }, + layout: { // hide elements, but don't disable feature + toolbar: { + file: { // menu file + close: false / true, // close menu button + settings: false / true, // advanced settings + info: false / true // document info + } / false / true, + layout: false / true, // layout tab + references: false / true, // de references tab + collaboration: false / true // collaboration tab + protect: false / true, // protect tab + plugins: false / true // plugins tab + }, + header: { + users: false/true // users list button + }, + leftMenu: { + navigation: false/true + } / false / true, // use instead of customization.leftMenu + rightMenu: false/true, // use instead of customization.rightMenu + statusBar: { + textLang: false/true // text language button in de/pe + docLang: false/true // document language button in de/pe + } + }, + features: { // disable feature + spellcheck: { + mode: false/true // init value + change: false/true // hide/show feature + } / false / true // if false/true - use as init value. use instead of customization.spellcheck parameter + }, chat: true, comments: true, zoom: 100, compactToolbar: false, - leftMenu: true, - rightMenu: true, + leftMenu: true, // must be deprecated. use layout.leftMenu instead + rightMenu: true, // must be deprecated. use layout.rightMenu instead hideRightMenu: false, // hide or show right panel on first loading toolbar: true, statusBar: true, @@ -163,7 +194,7 @@ toolbarNoTabs: false, toolbarHideFileName: false, reviewDisplay: 'original', // must be deprecated. use customization.review.reviewDisplay instead - spellcheck: true, + spellcheck: true, // must be deprecated. use customization.features.spellcheck instead compatibleFeatures: false, unit: 'cm' // cm, pt, inch, mentionShare : true // customize tooltip for mention, diff --git a/apps/common/main/lib/component/Mixtbar.js b/apps/common/main/lib/component/Mixtbar.js index 44fc291ab..68ff16136 100644 --- a/apps/common/main/lib/component/Mixtbar.js +++ b/apps/common/main/lib/component/Mixtbar.js @@ -99,7 +99,8 @@ define([ '<% if (typeof items[i] == "object") { %>' + '
  • ' + - '<% if (items[i].extcls) print(\' \' + items[i].extcls) %>">' + + '<% if (items[i].extcls) print(\' \' + items[i].extcls) %>"' + + '<% if (typeof items[i].layoutname == "string") print(" data-layout-name=" + \' \' + items[i].layoutname) + \' \' %>>' + '<%= items[i].caption %>' + '
  • ' + '<% } %>' + @@ -316,7 +317,7 @@ define([ return config.tabs[index].action; } - var _tabTemplate = _.template(''); + var _tabTemplate = _.template(''); config.tabs[after + 1] = tab; var _after_action = _get_tab_action(after); diff --git a/apps/common/main/lib/component/Window.js b/apps/common/main/lib/component/Window.js index 2a5d65545..302e98995 100644 --- a/apps/common/main/lib/component/Window.js +++ b/apps/common/main/lib/component/Window.js @@ -138,7 +138,7 @@ define([ 'common/main/lib/component/BaseView', 'common/main/lib/component/CheckBox', - 'common/main/lib/component/FocusManager' + 'common/main/lib/controller/FocusManager' ], function () { 'use strict'; diff --git a/apps/common/main/lib/component/FocusManager.js b/apps/common/main/lib/controller/FocusManager.js similarity index 100% rename from apps/common/main/lib/component/FocusManager.js rename to apps/common/main/lib/controller/FocusManager.js diff --git a/apps/common/main/lib/component/HintManager.js b/apps/common/main/lib/controller/HintManager.js similarity index 100% rename from apps/common/main/lib/component/HintManager.js rename to apps/common/main/lib/controller/HintManager.js diff --git a/apps/common/main/lib/controller/LayoutManager.js b/apps/common/main/lib/controller/LayoutManager.js new file mode 100644 index 000000000..3efe4709f --- /dev/null +++ b/apps/common/main/lib/controller/LayoutManager.js @@ -0,0 +1,144 @@ +/* + * + * (c) Copyright Ascensio System SIA 2010-2021 + * + * This program is a free software product. You can redistribute it and/or + * modify it under the terms of the GNU Affero General Public License (AGPL) + * version 3 as published by the Free Software Foundation. In accordance with + * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement + * of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For + * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha + * street, Riga, Latvia, EU, LV-1050. + * + * The interactive user interfaces in modified source and object code versions + * of the Program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product + * logo when distributing the program. Pursuant to Section 7(e) we decline to + * grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as + * well as technical writing content are licensed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International. See the License + * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode + * + */ +/** + * LayoutManager.js + * + * Created by Julia Radzhabova on 06.10.2021 + * Copyright (c) 2021 Ascensio System SIA. All rights reserved. + * + */ + + +if (Common === undefined) + var Common = {}; + +if (Common.UI === undefined) { + Common.UI = {}; +} + +Common.UI.LayoutManager = new(function() { + var _config; + var _init = function(config) { + _config = config; + }; + + var _applyCustomization = function(config, el, prefix) { + !config && (config = _config); + if (!config) return; + + for (var name in config) { + if(config.hasOwnProperty(name)) { + if(typeof config[name] === 'object') + _applyCustomization(config[name], el, name + '-'); + else if (config[name] === false) { + var selector = '[data-layout-name=' + (prefix || '') + name + ']', + cmp = el ? el.find(selector) : $(selector); + cmp && cmp.hide && cmp.hide(); + } + } + } + }; + + var _isElementVisible = function(value, config, prefix) { + !config && (config = _config); + if (!config) return true; + + var res = true; + for (var name in config) { + if(config.hasOwnProperty(name)) { + if(typeof config[name] === 'object') + res = _isElementVisible(value, config[name], (prefix || '') + name + '-'); + else { + if (value === (prefix || '') + name) { // checked value is in config + res = config[name]; + } + } + if (res===false) return res; + } + } + return res; + }; + + return { + init: _init, + applyCustomization: _applyCustomization, + isElementVisible: _isElementVisible + } +})(); + +/** + * features: { + * feature: { //can be object or init value + * mode: // value1 / value2 ... + * change: false/true // hide/show feature + * } / value1 / value2 ... + * } + */ +Common.UI.FeaturesManager = new(function() { + var _config; + var _init = function(config) { + _config = config; + }; + + var _canChange = function(name) { + return !(_config && typeof _config[name] === 'object' && _config[name] && _config[name].change===false); + }; + + var _getInitValue2 = function(name, defValue) { + if (_config && _config[name] !== undefined ) { + if (typeof _config[name] === 'object' && _config[name]) { // object and not null + if (_config[name].mode!==undefined) + return _config[name].mode; + } else + return _config[name]; + } + + return defValue; + }; + + var _getInitValue = function(name) { + if (_config && _config[name] !== undefined ) { + if (typeof _config[name] === 'object' && _config[name]) { // object and not null + if (_config[name].mode!==undefined) + return _config[name].mode; + } else + return _config[name]; + } + }; + + return { + init: _init, + canChange: _canChange, + getInitValue: _getInitValue + } +})(); \ No newline at end of file diff --git a/apps/common/main/lib/controller/Plugins.js b/apps/common/main/lib/controller/Plugins.js index 1513fc2cd..d53ad2b73 100644 --- a/apps/common/main/lib/controller/Plugins.js +++ b/apps/common/main/lib/controller/Plugins.js @@ -63,7 +63,7 @@ define([ var appOptions = me.getApplication().getController('Main').appOptions; if ( !appOptions.isEditMailMerge && !appOptions.isEditDiagram ) { - var tab = {action: 'plugins', caption: me.panelPlugins.groupCaption}; + var tab = {action: 'plugins', caption: me.panelPlugins.groupCaption, layoutname: 'toolbar-plugins'}; me.$toolbarPanelPlugins = me.panelPlugins.getPanel(); toolbar.addTab(tab, me.$toolbarPanelPlugins, 10); // TODO: clear plugins list in left panel @@ -219,7 +219,7 @@ define([ }); this.api.asc_pluginsRegister('', arr); if (storePlugins.hasVisible()) - Common.NotificationCenter.trigger('tab:visible', 'plugins', true); + Common.NotificationCenter.trigger('tab:visible', 'plugins', Common.UI.LayoutManager.isElementVisible('toolbar-plugins')); Common.Gateway.pluginsReady(); }, diff --git a/apps/common/main/lib/controller/ReviewChanges.js b/apps/common/main/lib/controller/ReviewChanges.js index 2e91f7a0b..1168fd5ca 100644 --- a/apps/common/main/lib/controller/ReviewChanges.js +++ b/apps/common/main/lib/controller/ReviewChanges.js @@ -585,13 +585,15 @@ define([ } }, - onTurnSpelling: function (state) { + onTurnSpelling: function (state, suspend) { state = (state == 'on'); - this.view.turnSpelling(state); + this.view && this.view.turnSpelling(state); - Common.localStorage.setItem(this.view.appPrefix + "settings-spellcheck", state ? 1 : 0); - this.api.asc_setSpellCheck(state); - Common.Utils.InternalSettings.set(this.view.appPrefix + "settings-spellcheck", state); + if (Common.UI.FeaturesManager.canChange('spellcheck') && !suspend) { + Common.localStorage.setItem(this.view.appPrefix + "settings-spellcheck", state ? 1 : 0); + this.api.asc_setSpellCheck(state); + Common.Utils.InternalSettings.set(this.view.appPrefix + "settings-spellcheck", state); + } }, onReviewViewClick: function(menu, item, e) { @@ -802,9 +804,6 @@ define([ onAppReady: function (config) { var me = this; - if ( me.view && Common.localStorage.getBool(me.view.appPrefix + "settings-spellcheck", !(config.customization && config.customization.spellcheck===false))) - me.view.turnSpelling(true); - if ( config.canReview ) { (new Promise(function (resolve) { resolve(); diff --git a/apps/common/main/lib/view/Header.js b/apps/common/main/lib/view/Header.js index 56a229dfa..da94a37bb 100644 --- a/apps/common/main/lib/view/Header.js +++ b/apps/common/main/lib/view/Header.js @@ -82,7 +82,7 @@ define([ '
    ' + '
    ' + '' + - '
    ' + + '
    ' + // '' + ' -
    +
    @@ -146,7 +146,7 @@
    -
    +
    diff --git a/apps/documenteditor/main/app/template/Viewport.template b/apps/documenteditor/main/app/template/Viewport.template index b1fcb9b38..c407ba7a5 100644 --- a/apps/documenteditor/main/app/template/Viewport.template +++ b/apps/documenteditor/main/app/template/Viewport.template @@ -7,10 +7,10 @@
    -
    +
    -
    +
    diff --git a/apps/documenteditor/main/app/view/FileMenu.js b/apps/documenteditor/main/app/view/FileMenu.js index 9345c5626..e63099a3d 100644 --- a/apps/documenteditor/main/app/view/FileMenu.js +++ b/apps/documenteditor/main/app/view/FileMenu.js @@ -84,6 +84,16 @@ define([ render: function () { var $markup = $(this.template()); + this.miClose = new Common.UI.MenuItem({ + el : $markup.elementById('#fm-btn-return'), + action : 'back', + caption : this.btnCloseMenuCaption, + canFocused: false, + dataHint: 1, + dataHintDirection: 'left-top', + dataHintOffset: [2, 14] + }); + this.miSave = new Common.UI.MenuItem({ el : $markup.elementById('#fm-btn-save'), action : 'save', @@ -199,6 +209,16 @@ define([ dataHintOffset: [2, 14] }); + this.miInfo = new Common.UI.MenuItem({ + el : $markup.elementById('#fm-btn-info'), + action : 'info', + caption : this.btnInfoCaption, + canFocused: false, + dataHint: 1, + dataHintDirection: 'left-top', + dataHintOffset: [2, 14] + }); + this.miAccess = new Common.UI.MenuItem({ el : $markup.elementById('#fm-btn-rights'), action : 'rights', @@ -223,6 +243,16 @@ define([ delete this.options.miHistory; } + this.miSettings = new Common.UI.MenuItem({ + el : $markup.elementById('#fm-btn-settings'), + action : 'opts', + caption : this.btnSettingsCaption, + canFocused: false, + dataHint: 1, + dataHintDirection: 'left-top', + dataHintOffset: [2, 14] + }); + this.miHelp = new Common.UI.MenuItem({ el : $markup.elementById('#fm-btn-help'), action : 'help', @@ -233,17 +263,19 @@ define([ dataHintOffset: [2, 14] }); + this.miBack = new Common.UI.MenuItem({ + el : $markup.elementById('#fm-btn-back'), + action : 'exit', + caption : this.btnBackCaption, + canFocused: false, + dataHint: 1, + dataHintDirection: 'left-top', + dataHintOffset: [2, 14] + }); + this.items = []; this.items.push( - new Common.UI.MenuItem({ - el : $markup.elementById('#fm-btn-return'), - action : 'back', - caption : this.btnCloseMenuCaption, - canFocused: false, - dataHint: 1, - dataHintDirection: 'left-top', - dataHintOffset: [2, 14] - }), + this.miClose, this.miSave, this.miEdit, this.miDownload, @@ -254,37 +286,12 @@ define([ this.miProtect, this.miRecent, this.miNew, - new Common.UI.MenuItem({ - el : $markup.elementById('#fm-btn-info'), - action : 'info', - caption : this.btnInfoCaption, - canFocused: false, - dataHint: 1, - dataHintDirection: 'left-top', - dataHintOffset: [2, 14] - }), + this.miInfo, this.miAccess, this.miHistory, - new Common.UI.MenuItem({ - el : $markup.elementById('#fm-btn-settings'), - action : 'opts', - caption : this.btnSettingsCaption, - canFocused: false, - dataHint: 1, - dataHintDirection: 'left-top', - dataHintOffset: [2, 14] - }), + this.miSettings, this.miHelp, - new Common.UI.MenuItem({ - el : $markup.elementById('#fm-btn-back'), - // el : _get_el('fm-btn-back'), - action : 'exit', - caption : this.btnBackCaption, - canFocused: false, - dataHint: 1, - dataHintDirection: 'left-top', - dataHintOffset: [2, 14] - }) + this.miBack ); this.rendered = true; @@ -350,6 +357,14 @@ define([ if (!this.mode) return; + var lastSeparator, + separatorVisible = false; + + var isVisible = Common.UI.LayoutManager.isElementVisible('toolbar-file-close'); + this.miClose[isVisible?'show':'hide'](); + this.miClose.$el.find('+.devider')[isVisible?'show':'hide'](); + isVisible && (lastSeparator = this.miClose.$el.find('+.devider')); + this.miDownload[((this.mode.canDownload || this.mode.canDownloadOrigin) && (!this.mode.isDesktopApp || !this.mode.isOffline))?'show':'hide'](); var isBCSupport = window["AscDesktopEditor"] ? window["AscDesktopEditor"]["isBlockchainSupport"]() : false; this.miSaveCopyAs[((this.mode.canDownload || this.mode.canDownloadOrigin) && (!this.mode.isDesktopApp || !this.mode.isOffline)) && (this.mode.canRequestSaveAs || this.mode.saveAsUrl) && !isBCSupport ?'show':'hide'](); @@ -359,22 +374,45 @@ define([ this.miPrint[this.mode.canPrint?'show':'hide'](); this.miRename[(this.mode.canRename && !this.mode.isDesktopApp) ?'show':'hide'](); this.miProtect[this.mode.canProtect ?'show':'hide'](); - var isVisible = this.mode.canDownload || this.mode.canDownloadOrigin || this.mode.isEdit || this.mode.canPrint || this.mode.canProtect || - !this.mode.isEdit && this.mode.canEdit && this.mode.canRequestEditRights || this.mode.canRename && !this.mode.isDesktopApp; - this.miProtect.$el.find('+.devider')[isVisible && !this.mode.isDisconnected?'show':'hide'](); + separatorVisible = (this.mode.canDownload || this.mode.canDownloadOrigin || this.mode.isEdit || this.mode.canPrint || this.mode.canProtect || + !this.mode.isEdit && this.mode.canEdit && this.mode.canRequestEditRights || this.mode.canRename && !this.mode.isDesktopApp) && !this.mode.isDisconnected; + this.miProtect.$el.find('+.devider')[separatorVisible?'show':'hide'](); + separatorVisible && (lastSeparator = this.miProtect.$el.find('+.devider')); + this.miRecent[this.mode.canOpenRecent?'show':'hide'](); this.miNew[this.mode.canCreateNew?'show':'hide'](); - this.miNew.$el.find('+.devider')[this.mode.canCreateNew?'show':'hide'](); + separatorVisible = this.mode.canCreateNew; + this.miNew.$el.find('+.devider')[separatorVisible?'show':'hide'](); + separatorVisible && (lastSeparator = this.miNew.$el.find('+.devider')); - this.miAccess[(!this.mode.isOffline && this.document&&this.document.info && - (this.document.info.sharingSettings&&this.document.info.sharingSettings.length>0 || - (this.mode.sharingSettingsUrl&&this.mode.sharingSettingsUrl.length || this.mode.canRequestSharingSettings)))?'show':'hide'](); + isVisible = Common.UI.LayoutManager.isElementVisible('toolbar-file-info'); + separatorVisible = isVisible; + this.miInfo[isVisible?'show':'hide'](); + isVisible = !this.mode.isOffline && this.document&&this.document.info && + (this.document.info.sharingSettings&&this.document.info.sharingSettings.length>0 || + (this.mode.sharingSettingsUrl&&this.mode.sharingSettingsUrl.length || this.mode.canRequestSharingSettings)); + separatorVisible = separatorVisible || isVisible; + this.miAccess[isVisible?'show':'hide'](); + isVisible = this.mode.canUseHistory&&!this.mode.isDisconnected; + separatorVisible = separatorVisible || isVisible; + this.miHistory[isVisible?'show':'hide'](); + this.miHistory.$el.find('+.devider')[separatorVisible?'show':'hide'](); + separatorVisible && (lastSeparator = this.miHistory.$el.find('+.devider')); - this.miHelp[this.mode.canHelp ?'show':'hide'](); - this.miHelp.$el.prev()[this.mode.canHelp ?'show':'hide'](); + isVisible = Common.UI.LayoutManager.isElementVisible('toolbar-file-settings'); + this.miSettings[isVisible?'show':'hide'](); + this.miSettings.$el.find('+.devider')[isVisible?'show':'hide'](); + isVisible && (lastSeparator = this.miSettings.$el.find('+.devider')); + + isVisible = this.mode.canHelp; + this.miHelp[isVisible ?'show':'hide'](); + this.miHelp.$el.find('+.devider')[isVisible?'show':'hide'](); + isVisible && (lastSeparator = this.miHelp.$el.find('+.devider')); + + isVisible = this.mode.canBack; + this.miBack[isVisible ?'show':'hide'](); + lastSeparator && !isVisible && lastSeparator.hide(); - this.mode.canBack ? this.$el.find('#fm-btn-back').show().prev().show() : - this.$el.find('#fm-btn-back').hide().prev().hide(); if (!this.customizationDone) { this.customizationDone = true; Common.Utils.applyCustomization(this.mode.customization, {goback: '#fm-btn-back > a'}); @@ -415,8 +453,6 @@ define([ this.panels['help'] = ((new DE.Views.FileMenuPanels.Help({menu: this})).render()); this.panels['help'].setLangConfig(this.mode.lang); } - - this.miHistory[this.mode.canUseHistory&&!this.mode.isDisconnected?'show':'hide'](); }, setMode: function(mode, delay) { diff --git a/apps/documenteditor/main/app/view/FileMenuPanels.js b/apps/documenteditor/main/app/view/FileMenuPanels.js index 950979fed..6d47bc5ed 100644 --- a/apps/documenteditor/main/app/view/FileMenuPanels.js +++ b/apps/documenteditor/main/app/view/FileMenuPanels.js @@ -222,10 +222,10 @@ define([ '', '', '','', - '', + '', '', '
    ', - '','', + '','', '', '', '
    ', @@ -612,6 +612,7 @@ define([ $('tr.coauth.changes-mode', this.el)[mode.isEdit && !mode.isOffline && mode.canCoAuthoring && mode.canChangeCoAuthoring ? 'show' : 'hide'](); $('tr.coauth.changes-show', this.el)[mode.isEdit && !mode.isOffline && mode.canCoAuthoring ? 'show' : 'hide'](); $('tr.view-review', this.el)[mode.canViewReview ? 'show' : 'hide'](); + $('tr.spellcheck', this.el)[mode.isEdit && Common.UI.FeaturesManager.canChange('spellcheck') ? 'show' : 'hide'](); $('tr.comments', this.el)[mode.canCoAuthoring ? 'show' : 'hide'](); /** coauthoring end **/ @@ -671,7 +672,8 @@ define([ if (this.mode.canForcesave) this.chForcesave.setValue(Common.Utils.InternalSettings.get("de-settings-forcesave")); - this.chSpell.setValue(Common.Utils.InternalSettings.get("de-settings-spellcheck")); + if (Common.UI.FeaturesManager.canChange('spellcheck')) + this.chSpell.setValue(Common.Utils.InternalSettings.get("de-settings-spellcheck")); this.chAlignGuides.setValue(Common.Utils.InternalSettings.get("de-settings-showsnaplines")); this.chCompatible.setValue(Common.Utils.InternalSettings.get("de-settings-compatible")); @@ -721,7 +723,8 @@ define([ Common.localStorage.setItem("de-settings-autosave", this.chAutosave.isChecked() ? 1 : 0); if (this.mode.canForcesave) Common.localStorage.setItem("de-settings-forcesave", this.chForcesave.isChecked() ? 1 : 0); - Common.localStorage.setItem("de-settings-spellcheck", this.chSpell.isChecked() ? 1 : 0); + if (Common.UI.FeaturesManager.canChange('spellcheck')) + Common.localStorage.setItem("de-settings-spellcheck", this.chSpell.isChecked() ? 1 : 0); Common.localStorage.setItem("de-settings-compatible", this.chCompatible.isChecked() ? 1 : 0); Common.Utils.InternalSettings.set("de-settings-compatible", this.chCompatible.isChecked() ? 1 : 0); Common.Utils.InternalSettings.set("de-settings-showsnaplines", this.chAlignGuides.isChecked()); diff --git a/apps/documenteditor/main/app/view/Statusbar.js b/apps/documenteditor/main/app/view/Statusbar.js index d3731cf1c..3cce34e35 100644 --- a/apps/documenteditor/main/app/view/Statusbar.js +++ b/apps/documenteditor/main/app/view/Statusbar.js @@ -207,7 +207,6 @@ define([ cls : 'btn-toolbar', caption : 'English (United States)', hintAnchor : 'top-left', - style : 'margin-left: 6px;', disabled: true, dataHint : '0', dataHintDirection: 'top', diff --git a/apps/documenteditor/main/app/view/Toolbar.js b/apps/documenteditor/main/app/view/Toolbar.js index 7350b5b81..0782567af 100644 --- a/apps/documenteditor/main/app/view/Toolbar.js +++ b/apps/documenteditor/main/app/view/Toolbar.js @@ -109,11 +109,11 @@ define([ Common.UI.Mixtbar.prototype.initialize.call(this, { template: _.template(template), tabs: [ - {caption: me.textTabFile, action: 'file', extcls: 'canedit', haspanel:false}, + {caption: me.textTabFile, action: 'file', extcls: 'canedit', layoutname: 'toolbar-file', haspanel:false}, {caption: me.textTabHome, action: 'home', extcls: 'canedit'}, {caption: me.textTabInsert, action: 'ins', extcls: 'canedit'}, - {caption: me.textTabLayout, action: 'layout', extcls: 'canedit'}, - {caption: me.textTabLinks, action: 'links', extcls: 'canedit'} + {caption: me.textTabLayout, action: 'layout', extcls: 'canedit', layoutname: 'toolbar-layout'}, + {caption: me.textTabLinks, action: 'links', extcls: 'canedit', layoutname: 'toolbar-references'} ] } ); @@ -1398,7 +1398,7 @@ define([ Common.UI.Mixtbar.prototype.initialize.call(this, { template: _.template(template_view), tabs: [ - {caption: me.textTabFile, action: 'file', haspanel: false} + {caption: me.textTabFile, action: 'file', layoutname: 'toolbar-file', haspanel: false} ] } ); diff --git a/apps/documenteditor/main/index.html b/apps/documenteditor/main/index.html index 8d72d3a61..28065a237 100644 --- a/apps/documenteditor/main/index.html +++ b/apps/documenteditor/main/index.html @@ -43,7 +43,7 @@ border: none; background: #e2e2e2; background: var(--canvas-background, #e2e2e2); - z-index: 1001; + z-index: 1002; } .loadmask > .brendpanel { diff --git a/apps/documenteditor/main/index.html.deploy b/apps/documenteditor/main/index.html.deploy index a3ec6e07f..e67fbcfca 100644 --- a/apps/documenteditor/main/index.html.deploy +++ b/apps/documenteditor/main/index.html.deploy @@ -21,7 +21,7 @@ border: none; background: #e2e2e2; background: var(--canvas-background, #e2e2e2); - z-index: 1001; + z-index: 1002; } .loadmask > .brendpanel { diff --git a/apps/documenteditor/main/index_loader.html b/apps/documenteditor/main/index_loader.html index dd264349c..45e7b59f6 100644 --- a/apps/documenteditor/main/index_loader.html +++ b/apps/documenteditor/main/index_loader.html @@ -23,7 +23,7 @@ overflow: hidden; border: none; background-color: #f4f4f4; - z-index: 1001; + z-index: 1002; } .loader-page { width: 100%; diff --git a/apps/documenteditor/main/index_loader.html.deploy b/apps/documenteditor/main/index_loader.html.deploy index 2ed070fc8..dc5963849 100644 --- a/apps/documenteditor/main/index_loader.html.deploy +++ b/apps/documenteditor/main/index_loader.html.deploy @@ -24,7 +24,7 @@ overflow: hidden; border: none; background-color: #f4f4f4; - z-index: 1001; + z-index: 1002; } .loader-page { diff --git a/apps/documenteditor/main/resources/less/statusbar.less b/apps/documenteditor/main/resources/less/statusbar.less index ed9adabde..73a76acb8 100644 --- a/apps/documenteditor/main/resources/less/statusbar.less +++ b/apps/documenteditor/main/resources/less/statusbar.less @@ -30,21 +30,12 @@ text-align: center; } - #btn-doc-lang { - margin-right: 9px; - } - - #btn-doc-spell { - margin-right: 5px; - } - #btn-zoom-topage { - margin-right: 9px; - margin-left: 6px; + margin-right: 8px; } #btn-zoom-towidth { - margin-right: 9px; + margin-right: 8px; } .status-group { @@ -58,12 +49,17 @@ } .separator { - margin: 0px 3px 0 4px; + margin: 0px 6px; &.short { height: 25px; margin-top: -2px; } + + &.space { + margin: 0px 2px; + border: none; + } } #btn-cnt-lang { diff --git a/apps/presentationeditor/main/app/controller/LeftMenu.js b/apps/presentationeditor/main/app/controller/LeftMenu.js index adef2df42..3be667173 100644 --- a/apps/presentationeditor/main/app/controller/LeftMenu.js +++ b/apps/presentationeditor/main/app/controller/LeftMenu.js @@ -368,9 +368,11 @@ define([ this.api.asc_setAutoSaveGap(value); } - value = Common.localStorage.getBool("pe-settings-spellcheck", true); - Common.Utils.InternalSettings.set("pe-settings-spellcheck", value); - this.api.asc_setSpellCheck(value); + if (Common.UI.FeaturesManager.canChange('spellcheck')) { + value = Common.localStorage.getBool("pe-settings-spellcheck", true); + Common.Utils.InternalSettings.set("pe-settings-spellcheck", value); + this.api.asc_setSpellCheck(value); + } value = parseInt(Common.localStorage.getItem("pe-settings-paste-button")); Common.Utils.InternalSettings.set("pe-settings-paste-button", value); diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js index e0f1ff0bc..3bbcdc49d 100644 --- a/apps/presentationeditor/main/app/controller/Main.js +++ b/apps/presentationeditor/main/app/controller/Main.js @@ -54,7 +54,9 @@ define([ 'presentationeditor/main/app/collection/ShapeGroups', 'presentationeditor/main/app/collection/SlideLayouts', 'presentationeditor/main/app/collection/EquationGroups', - 'common/main/lib/component/HintManager' + 'common/main/lib/controller/FocusManager', + 'common/main/lib/controller/HintManager', + 'common/main/lib/controller/LayoutManager' ], function () { 'use strict'; PE.Controllers.Main = Backbone.Controller.extend(_.extend((function() { @@ -774,9 +776,17 @@ define([ var zf = (value!==null) ? parseInt(value) : (this.appOptions.customization && this.appOptions.customization.zoom ? parseInt(this.appOptions.customization.zoom) : -1); (zf == -1) ? this.api.zoomFitToPage() : ((zf == -2) ? this.api.zoomFitToWidth() : this.api.zoom(zf>0 ? zf : 100)); - value = Common.localStorage.getBool("pe-settings-spellcheck", !(this.appOptions.customization && this.appOptions.customization.spellcheck===false)); - Common.Utils.InternalSettings.set("pe-settings-spellcheck", value); + // spellcheck + value = Common.UI.FeaturesManager.getInitValue('spellcheck'); + value = (value !== undefined) ? value : !(this.appOptions.customization && this.appOptions.customization.spellcheck===false); + if (this.appOptions.customization && this.appOptions.customization.spellcheck!==undefined) + console.log("Obsolete: The 'spellcheck' parameter of the 'customization' section is deprecated. Please use 'spellcheck' parameter in the 'customization.features' section instead."); + if (Common.UI.FeaturesManager.canChange('spellcheck')) { // get from local storage + value = Common.localStorage.getBool("pe-settings-spellcheck", value); + Common.Utils.InternalSettings.set("pe-settings-spellcheck", value); + } me.api.asc_setSpellCheck(value); + Common.NotificationCenter.trigger('spelling:turn', value ? 'on' : 'off', true); // only toggle buttons value = Common.localStorage.getBool('pe-hidden-notes', this.appOptions.customization && this.appOptions.customization.hideNotes===true); me.api.asc_ShowNotes(!value); @@ -1146,6 +1156,8 @@ define([ this.appOptions.canRename && appHeader.setCanRename(true); this.appOptions.canBrandingExt = params.asc_getCanBranding() && (typeof this.editorConfig.customization == 'object' || this.editorConfig.plugins); this.getApplication().getController('Common.Controllers.Plugins').setMode(this.appOptions); + this.appOptions.canBrandingExt && this.editorConfig.customization && Common.UI.LayoutManager.init(this.editorConfig.customization.layout); + this.appOptions.canBrandingExt && this.editorConfig.customization && Common.UI.FeaturesManager.init(this.editorConfig.customization.features); this.appOptions.canChangeCoAuthoring = this.appOptions.isEdit && this.appOptions.canCoAuthoring && !(typeof this.editorConfig.coEditing == 'object' && this.editorConfig.coEditing.change===false); @@ -1696,6 +1708,13 @@ define([ Common.Utils.applyCustomization(this.appOptions.customization, mapCustomizationElements); if (this.appOptions.canBrandingExt) { Common.Utils.applyCustomization(this.appOptions.customization, mapCustomizationExtElements); + Common.UI.LayoutManager.applyCustomization(); + if (this.appOptions.customization && (typeof (this.appOptions.customization) == 'object')) { + if (this.appOptions.customization.leftMenu!==undefined) + console.log("Obsolete: The 'leftMenu' parameter of the 'customization' section is deprecated. Please use 'leftMenu' parameter in the 'customization.layout' section instead."); + if (this.appOptions.customization.rightMenu!==undefined) + console.log("Obsolete: The 'rightMenu' parameter of the 'customization' section is deprecated. Please use 'rightMenu' parameter in the 'customization.layout' section instead."); + } promise = this.getApplication().getController('Common.Controllers.Plugins').applyUICustomization(); } } diff --git a/apps/presentationeditor/main/app/controller/Statusbar.js b/apps/presentationeditor/main/app/controller/Statusbar.js index 7d3dd803c..592aa85ec 100644 --- a/apps/presentationeditor/main/app/controller/Statusbar.js +++ b/apps/presentationeditor/main/app/controller/Statusbar.js @@ -107,6 +107,12 @@ define([ me.btnDocLang = review.getButton('doclang', 'statusbar'); me.btnDocLang.render( me.statusbar.$el.find('#btn-doc-lang') ); + var isVisible = (Common.UI.LayoutManager.isElementVisible('statusBar-textLang') || Common.UI.LayoutManager.isElementVisible('statusBar-docLang')) + && Common.UI.FeaturesManager.canChange('spellcheck'); + me.btnDocLang.$el.find('+.separator.space')[isVisible?'show':'hide'](); + isVisible = Common.UI.LayoutManager.isElementVisible('statusBar-textLang') || Common.UI.LayoutManager.isElementVisible('statusBar-docLang') + || Common.UI.FeaturesManager.canChange('spellcheck'); + me.statusbar.$el.find('.el-lang')[isVisible?'show':'hide'](); } else { me.statusbar.$el.find('.el-edit, .el-review').hide(); } diff --git a/apps/presentationeditor/main/app/controller/Toolbar.js b/apps/presentationeditor/main/app/controller/Toolbar.js index 02b8def65..3c2a3d378 100644 --- a/apps/presentationeditor/main/app/controller/Toolbar.js +++ b/apps/presentationeditor/main/app/controller/Toolbar.js @@ -2479,11 +2479,11 @@ define([ } me.toolbar.render(_.extend({compactview: compactview}, config)); - var tab = {action: 'review', caption: me.toolbar.textTabCollaboration}; + var tab = {action: 'review', caption: me.toolbar.textTabCollaboration, layoutname: 'toolbar-collaboration'}; var $panel = me.getApplication().getController('Common.Controllers.ReviewChanges').createToolbarPanel(); if ( $panel ) { me.toolbar.addTab(tab, $panel, 4); - me.toolbar.setVisible('review', config.isEdit || config.canViewReview || config.canCoAuthoring && config.canComments); + me.toolbar.setVisible('review', (config.isEdit || config.canViewReview || config.canCoAuthoring && config.canComments) && Common.UI.LayoutManager.isElementVisible('toolbar-collaboration')); } if ( config.isEdit ) { @@ -2510,7 +2510,7 @@ define([ if ( config.isDesktopApp ) { if ( config.canProtect ) { // don't add protect panel to toolbar - tab = {action: 'protect', caption: me.toolbar.textTabProtect}; + tab = {action: 'protect', caption: me.toolbar.textTabProtect, layoutname: 'toolbar-protect'}; $panel = me.getApplication().getController('Common.Controllers.Protection').createToolbarPanel(); if ($panel) me.toolbar.addTab(tab, $panel, 4); diff --git a/apps/presentationeditor/main/app/template/FileMenu.template b/apps/presentationeditor/main/app/template/FileMenu.template index 8bb022a44..335e29ba6 100644 --- a/apps/presentationeditor/main/app/template/FileMenu.template +++ b/apps/presentationeditor/main/app/template/FileMenu.template @@ -1,6 +1,6 @@
  • -
  • +
  • @@ -14,11 +14,11 @@
  • -
  • +
  • -
  • +
  • diff --git a/apps/presentationeditor/main/app/template/StatusBar.template b/apps/presentationeditor/main/app/template/StatusBar.template index fed810b75..a175b6f56 100644 --- a/apps/presentationeditor/main/app/template/StatusBar.template +++ b/apps/presentationeditor/main/app/template/StatusBar.template @@ -27,10 +27,11 @@
    - - + + +
    -
    +
    diff --git a/apps/presentationeditor/main/app/template/Viewport.template b/apps/presentationeditor/main/app/template/Viewport.template index a9f742c40..8f80302b9 100644 --- a/apps/presentationeditor/main/app/template/Viewport.template +++ b/apps/presentationeditor/main/app/template/Viewport.template @@ -8,10 +8,10 @@
    -
    +
    -
    +
    diff --git a/apps/presentationeditor/main/app/view/FileMenu.js b/apps/presentationeditor/main/app/view/FileMenu.js index 696fd31d0..139753fe7 100644 --- a/apps/presentationeditor/main/app/view/FileMenu.js +++ b/apps/presentationeditor/main/app/view/FileMenu.js @@ -87,6 +87,16 @@ define([ render: function () { var $markup = $(this.template()); + this.miClose = new Common.UI.MenuItem({ + el : $markup.elementById('#fm-btn-return'), + action : 'back', + caption : this.btnCloseMenuCaption, + canFocused: false, + dataHint: 1, + dataHintDirection: 'left-top', + dataHintOffset: [2, 14] + }); + this.miSave = new Common.UI.MenuItem({ el : $markup.elementById('#fm-btn-save'), action : 'save', @@ -200,6 +210,16 @@ define([ dataHintOffset: [2, 14] }); + this.miInfo = new Common.UI.MenuItem({ + el : $markup.elementById('#fm-btn-info'), + action : 'info', + caption : this.btnInfoCaption, + canFocused: false, + dataHint: 1, + dataHintDirection: 'left-top', + dataHintOffset: [2, 14] + }); + this.miAccess = new Common.UI.MenuItem({ el : $markup.elementById('#fm-btn-rights'), action : 'rights', @@ -220,6 +240,16 @@ define([ dataHintOffset: [2, 14] }); + this.miSettings = new Common.UI.MenuItem({ + el : $markup.elementById('#fm-btn-settings'), + action : 'opts', + caption : this.btnSettingsCaption, + canFocused: false, + dataHint: 1, + dataHintDirection: 'left-top', + dataHintOffset: [2, 14] + }); + this.miHistory = new Common.UI.MenuItem({ el : $markup.elementById('#fm-btn-history'), action : 'history', @@ -234,17 +264,19 @@ define([ delete this.options.miHistory; } + this.miBack = new Common.UI.MenuItem({ + el : $markup.elementById('#fm-btn-back'), + action : 'exit', + caption : this.btnBackCaption, + canFocused: false, + dataHint: 1, + dataHintDirection: 'left-top', + dataHintOffset: [2, 14] + }); + this.items = []; this.items.push( - new Common.UI.MenuItem({ - el : $markup.elementById('#fm-btn-return'), - action : 'back', - caption : this.btnCloseMenuCaption, - canFocused: false, - dataHint: 1, - dataHintDirection: 'left-top', - dataHintOffset: [2, 14] - }), + this.miClose, this.miSave, this.miEdit, this.miDownload, @@ -255,36 +287,12 @@ define([ this.miProtect, this.miRecent, this.miNew, - new Common.UI.MenuItem({ - el : $markup.elementById('#fm-btn-info'), - action : 'info', - caption : this.btnInfoCaption, - canFocused: false, - dataHint: 1, - dataHintDirection: 'left-top', - dataHintOffset: [2, 14] - }), + this.miInfo, this.miAccess, this.miHistory, - new Common.UI.MenuItem({ - el : $markup.elementById('#fm-btn-settings'), - action : 'opts', - caption : this.btnSettingsCaption, - canFocused: false, - dataHint: 1, - dataHintDirection: 'left-top', - dataHintOffset: [2, 14] - }), + this.miSettings, this.miHelp, - new Common.UI.MenuItem({ - el : $markup.elementById('#fm-btn-back'), - action : 'exit', - caption : this.btnBackCaption, - canFocused: false, - dataHint: 1, - dataHintDirection: 'left-top', - dataHintOffset: [2, 14] - }) + this.miBack ); this.rendered = true; @@ -350,6 +358,14 @@ define([ if (!this.mode) return; + var lastSeparator, + separatorVisible = false; + + var isVisible = Common.UI.LayoutManager.isElementVisible('toolbar-file-close'); + this.miClose[isVisible?'show':'hide'](); + this.miClose.$el.find('+.devider')[isVisible?'show':'hide'](); + isVisible && (lastSeparator = this.miClose.$el.find('+.devider')); + this.miDownload[(this.mode.canDownload && (!this.mode.isDesktopApp || !this.mode.isOffline))?'show':'hide'](); var isBCSupport = window["AscDesktopEditor"] ? window["AscDesktopEditor"]["isBlockchainSupport"]() : false; this.miSaveCopyAs[(this.mode.canDownload && (!this.mode.isDesktopApp || !this.mode.isOffline)) && (this.mode.canRequestSaveAs || this.mode.saveAsUrl) && !isBCSupport ?'show':'hide'](); @@ -359,26 +375,50 @@ define([ this.miPrint[this.mode.canPrint?'show':'hide'](); this.miRename[(this.mode.canRename && !this.mode.isDesktopApp) ?'show':'hide'](); this.miProtect[this.mode.canProtect ?'show':'hide'](); - var isVisible = this.mode.canDownload || this.mode.isEdit || this.mode.canPrint || this.mode.canProtect || - !this.mode.isEdit && this.mode.canEdit && this.mode.canRequestEditRights || this.mode.canRename && !this.mode.isDesktopApp; - this.miProtect.$el.find('+.devider')[isVisible && !this.mode.isDisconnected?'show':'hide'](); + separatorVisible = (this.mode.canDownload || this.mode.isEdit || this.mode.canPrint || this.mode.canProtect || + !this.mode.isEdit && this.mode.canEdit && this.mode.canRequestEditRights || this.mode.canRename && !this.mode.isDesktopApp) && !this.mode.isDisconnected; + this.miProtect.$el.find('+.devider')[separatorVisible?'show':'hide'](); + separatorVisible && (lastSeparator = this.miProtect.$el.find('+.devider')); + this.miRecent[this.mode.canOpenRecent?'show':'hide'](); this.miNew[this.mode.canCreateNew?'show':'hide'](); - this.miNew.$el.find('+.devider')[this.mode.canCreateNew?'show':'hide'](); + separatorVisible = this.mode.canCreateNew; + this.miNew.$el.find('+.devider')[separatorVisible?'show':'hide'](); + separatorVisible && (lastSeparator = this.miNew.$el.find('+.devider')); - this.miAccess[(!this.mode.isOffline && this.document&&this.document.info&&(this.document.info.sharingSettings&&this.document.info.sharingSettings.length>0 || - (this.mode.sharingSettingsUrl&&this.mode.sharingSettingsUrl.length || this.mode.canRequestSharingSettings)))?'show':'hide'](); + isVisible = Common.UI.LayoutManager.isElementVisible('toolbar-file-info'); + separatorVisible = isVisible; + this.miInfo[isVisible?'show':'hide'](); + isVisible = !this.mode.isOffline && this.document&&this.document.info && + (this.document.info.sharingSettings&&this.document.info.sharingSettings.length>0 || + (this.mode.sharingSettingsUrl&&this.mode.sharingSettingsUrl.length || this.mode.canRequestSharingSettings)); + separatorVisible = separatorVisible || isVisible; + this.miAccess[isVisible?'show':'hide'](); + isVisible = this.mode.canUseHistory&&!this.mode.isDisconnected; + separatorVisible = separatorVisible || isVisible; + this.miHistory[isVisible?'show':'hide'](); + this.miHistory.$el.find('+.devider')[separatorVisible?'show':'hide'](); + separatorVisible && (lastSeparator = this.miHistory.$el.find('+.devider')); + + isVisible = Common.UI.LayoutManager.isElementVisible('toolbar-file-settings'); + this.miSettings[isVisible?'show':'hide'](); + this.miSettings.$el.find('+.devider')[isVisible?'show':'hide'](); + isVisible && (lastSeparator = this.miSettings.$el.find('+.devider')); + + isVisible = this.mode.canHelp; + this.miHelp[isVisible ?'show':'hide'](); + this.miHelp.$el.find('+.devider')[isVisible?'show':'hide'](); + isVisible && (lastSeparator = this.miHelp.$el.find('+.devider')); + + isVisible = this.mode.canBack; + this.miBack[isVisible ?'show':'hide'](); + lastSeparator && !isVisible && lastSeparator.hide(); - this.mode.canBack ? this.$el.find('#fm-btn-back').show().prev().show() : - this.$el.find('#fm-btn-back').hide().prev().hide(); if (!this.customizationDone) { this.customizationDone = true; Common.Utils.applyCustomization(this.mode.customization, {goback: '#fm-btn-back > a'}); } - this.miHelp[this.mode.canHelp ?'show':'hide'](); - this.miHelp.$el.prev()[this.mode.canHelp ?'show':'hide'](); - this.panels['opts'].setMode(this.mode); this.panels['info'].setMode(this.mode); !this.mode.isDisconnected && this.panels['info'].updateInfo(this.document); @@ -413,8 +453,6 @@ define([ this.panels['help'] = ((new PE.Views.FileMenuPanels.Help({menu: this})).render()); this.panels['help'].setLangConfig(this.mode.lang); } - - this.miHistory[this.mode.canUseHistory&&!this.mode.isDisconnected?'show':'hide'](); }, setMode: function(mode, delay) { diff --git a/apps/presentationeditor/main/app/view/FileMenuPanels.js b/apps/presentationeditor/main/app/view/FileMenuPanels.js index 196a6182d..e9d8a1c9a 100644 --- a/apps/presentationeditor/main/app/view/FileMenuPanels.js +++ b/apps/presentationeditor/main/app/view/FileMenuPanels.js @@ -200,10 +200,10 @@ define([ template: _.template([ '
    ', '', - '', + '', '', '', - '','', + '','', '', '', '', @@ -524,6 +524,7 @@ define([ $('tr.coauth.changes', this.el)[mode.isEdit && !mode.isOffline && mode.canCoAuthoring && mode.canChangeCoAuthoring ? 'show' : 'hide'](); /** coauthoring end **/ $('tr.macros', this.el)[(mode.customization && mode.customization.macros===false) ? 'hide' : 'show'](); + $('tr.spellcheck', this.el)[mode.isEdit && Common.UI.FeaturesManager.canChange('spellcheck') ? 'show' : 'hide'](); if ( !Common.UI.Themes.available() ) { $('tr.themes, tr.themes + tr.divider', this.el).hide(); @@ -536,7 +537,8 @@ define([ }, updateSettings: function() { - this.chSpell.setValue(Common.Utils.InternalSettings.get("pe-settings-spellcheck")); + if (Common.UI.FeaturesManager.canChange('spellcheck')) + this.chSpell.setValue(Common.Utils.InternalSettings.get("pe-settings-spellcheck")); this.chInputMode.setValue(Common.Utils.InternalSettings.get("pe-settings-inputmode")); @@ -596,7 +598,8 @@ define([ applySettings: function() { Common.UI.Themes.setTheme(this.cmbTheme.getValue()); - Common.localStorage.setItem("pe-settings-spellcheck", this.chSpell.isChecked() ? 1 : 0); + if (Common.UI.FeaturesManager.canChange('spellcheck')) + Common.localStorage.setItem("pe-settings-spellcheck", this.chSpell.isChecked() ? 1 : 0); Common.localStorage.setItem("pe-settings-inputmode", this.chInputMode.isChecked() ? 1 : 0); Common.localStorage.setItem("pe-settings-zoom", this.cmbZoom.getValue()); Common.Utils.InternalSettings.set("pe-settings-zoom", Common.localStorage.getItem("pe-settings-zoom")); diff --git a/apps/presentationeditor/main/app/view/Statusbar.js b/apps/presentationeditor/main/app/view/Statusbar.js index 0cc204627..726b7d9b1 100644 --- a/apps/presentationeditor/main/app/view/Statusbar.js +++ b/apps/presentationeditor/main/app/view/Statusbar.js @@ -269,7 +269,6 @@ define([ caption : 'English (United States)', hint: this.tipSetLang, hintAnchor : 'top-left', - style : 'margin-left: 6px;', disabled: true, dataHint : '0', dataHintDirection: 'top', diff --git a/apps/presentationeditor/main/app/view/Toolbar.js b/apps/presentationeditor/main/app/view/Toolbar.js index fcc338dab..68f56cd28 100644 --- a/apps/presentationeditor/main/app/view/Toolbar.js +++ b/apps/presentationeditor/main/app/view/Toolbar.js @@ -131,7 +131,7 @@ define([ Common.UI.Mixtbar.prototype.initialize.call(this, { template: _.template(template), tabs: [ - {caption: me.textTabFile, action: 'file', extcls: 'canedit', haspanel:false}, + {caption: me.textTabFile, action: 'file', extcls: 'canedit', layoutname: 'toolbar-file', haspanel:false}, {caption: me.textTabHome, action: 'home', extcls: 'canedit'}, {caption: me.textTabInsert, action: 'ins', extcls: 'canedit'}, {caption: me.textTabTransitions, action: 'transit', extcls: 'canedit'} @@ -1089,7 +1089,7 @@ define([ Common.UI.Mixtbar.prototype.initialize.call(this, { template: _.template(template_view), tabs: [ - {caption: me.textTabFile, action: 'file', haspanel:false} + {caption: me.textTabFile, action: 'file', layoutname: 'toolbar-file', haspanel:false} ] } ); diff --git a/apps/presentationeditor/main/index.html b/apps/presentationeditor/main/index.html index 9a886f86d..efbfbb6e0 100644 --- a/apps/presentationeditor/main/index.html +++ b/apps/presentationeditor/main/index.html @@ -33,7 +33,7 @@ border: none; background: #f0f0f0; background: var(--canvas-background, #f0f0f0); - z-index: 1001; + z-index: 1002; } .loadmask > .brendpanel { diff --git a/apps/presentationeditor/main/index.html.deploy b/apps/presentationeditor/main/index.html.deploy index 4f5c4c4cb..cd5b37de4 100644 --- a/apps/presentationeditor/main/index.html.deploy +++ b/apps/presentationeditor/main/index.html.deploy @@ -21,7 +21,7 @@ border: none; background: #f0f0f0; background: var(--canvas-background, #f0f0f0); - z-index: 1001; + z-index: 1002; } .loadmask > .brendpanel { diff --git a/apps/presentationeditor/main/index_loader.html b/apps/presentationeditor/main/index_loader.html index 16f730e0e..d00538574 100644 --- a/apps/presentationeditor/main/index_loader.html +++ b/apps/presentationeditor/main/index_loader.html @@ -21,7 +21,7 @@ overflow: hidden; border: none; background-color: #f4f4f4; - z-index: 1001; + z-index: 1002; } .loader-page { width: 100%; diff --git a/apps/presentationeditor/main/index_loader.html.deploy b/apps/presentationeditor/main/index_loader.html.deploy index d109aa1ad..9e537ac2d 100644 --- a/apps/presentationeditor/main/index_loader.html.deploy +++ b/apps/presentationeditor/main/index_loader.html.deploy @@ -24,7 +24,7 @@ overflow: hidden; border: none; background-color: #f4f4f4; - z-index: 1001; + z-index: 1002; } .loader-page { diff --git a/apps/presentationeditor/main/resources/less/statusbar.less b/apps/presentationeditor/main/resources/less/statusbar.less index 101197463..c12bf11f7 100644 --- a/apps/presentationeditor/main/resources/less/statusbar.less +++ b/apps/presentationeditor/main/resources/less/statusbar.less @@ -33,20 +33,11 @@ } #btn-zoom-topage { - margin-right: 9px; - margin-left: 6px; + margin-right: 8px; } #btn-zoom-towidth { - margin-right: 9px; - } - - #btn-doc-lang { - margin-right: 9px; - } - - #btn-doc-spell { - margin-right: 5px; + margin-right: 8px; } .status-group { @@ -60,10 +51,16 @@ } .separator { - margin: -2px 3px 0 4px; + margin: 0 6px; &.short { height: 25px; + margin-top: -2px; + } + + &.space { + margin: 0px 2px; + border: none; } } diff --git a/apps/spreadsheeteditor/main/app/controller/LeftMenu.js b/apps/spreadsheeteditor/main/app/controller/LeftMenu.js index bb426514a..f4c714e1d 100644 --- a/apps/spreadsheeteditor/main/app/controller/LeftMenu.js +++ b/apps/spreadsheeteditor/main/app/controller/LeftMenu.js @@ -239,8 +239,8 @@ define([ this.leftMenu.btnComments.hide(); } - if (this.mode.isEdit) { - this.leftMenu.btnSpellcheck.show(); + if (this.mode.isEdit && Common.UI.FeaturesManager.canChange('spellcheck')) { + Common.UI.LayoutManager.isElementVisible('leftMenu-spellcheck') && this.leftMenu.btnSpellcheck.show(); this.leftMenu.setOptionsPanel('spellcheck', this.getApplication().getController('Spellcheck').getView('Spellcheck')); } if (this.mode.canUseHistory) @@ -482,7 +482,7 @@ define([ }, applySpellcheckSettings: function(menu) { - if (this.mode.isEdit && this.api) { + if (this.mode.isEdit && this.api && Common.UI.FeaturesManager.canChange('spellcheck')) { var value = Common.localStorage.getBool("sse-spellcheck-ignore-uppercase-words"); this.api.asc_ignoreUppercase(value); value = Common.localStorage.getBool("sse-spellcheck-ignore-numbers-words"); diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index 717d5a325..16bd0510a 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -57,7 +57,9 @@ define([ 'spreadsheeteditor/main/app/collection/EquationGroups', 'spreadsheeteditor/main/app/collection/ConditionalFormatIcons', 'spreadsheeteditor/main/app/controller/FormulaDialog', - 'common/main/lib/component/HintManager' + 'common/main/lib/controller/FocusManager', + 'common/main/lib/controller/HintManager', + 'common/main/lib/controller/LayoutManager' ], function () { 'use strict'; @@ -857,14 +859,17 @@ define([ this.api.asc_setAutoSaveGap(Common.Utils.InternalSettings.get("sse-settings-autosave")); /** coauthoring end **/ - /** spellcheck settings begin **/ - var ignoreUppercase = Common.localStorage.getBool("sse-spellcheck-ignore-uppercase-words", true); - Common.Utils.InternalSettings.set("sse-spellcheck-ignore-uppercase-words", ignoreUppercase); - this.api.asc_ignoreUppercase(ignoreUppercase); - var ignoreNumbers = Common.localStorage.getBool("sse-spellcheck-ignore-numbers-words", true); - Common.Utils.InternalSettings.set("sse-spellcheck-ignore-numbers-words", ignoreNumbers); - this.api.asc_ignoreNumbers(ignoreNumbers); - /** spellcheck settings end **/ + // spellcheck + if (Common.UI.FeaturesManager.canChange('spellcheck')) { // get from local storage + /** spellcheck settings begin **/ + var ignoreUppercase = Common.localStorage.getBool("sse-spellcheck-ignore-uppercase-words", true); + Common.Utils.InternalSettings.set("sse-spellcheck-ignore-uppercase-words", ignoreUppercase); + this.api.asc_ignoreUppercase(ignoreUppercase); + var ignoreNumbers = Common.localStorage.getBool("sse-spellcheck-ignore-numbers-words", true); + Common.Utils.InternalSettings.set("sse-spellcheck-ignore-numbers-words", ignoreNumbers); + this.api.asc_ignoreNumbers(ignoreNumbers); + /** spellcheck settings end **/ + } me.api.asc_registerCallback('asc_onStartAction', _.bind(me.onLongActionBegin, me)); me.api.asc_registerCallback('asc_onConfirmAction', _.bind(me.onConfirmAction, me)); @@ -916,7 +921,7 @@ define([ this.formulaInput = celleditorController.getView('CellEditor').$el.find('textarea'); if (me.appOptions.isEdit) { - spellcheckController.setApi(me.api).setMode(me.appOptions); + Common.UI.FeaturesManager.canChange('spellcheck') && spellcheckController.setApi(me.api).setMode(me.appOptions); if (me.appOptions.canForcesave) {// use asc_setIsForceSaveOnUserSave only when customization->forcesave = true me.appOptions.forcesave = Common.localStorage.getBool("sse-settings-forcesave", me.appOptions.canForcesave); @@ -1257,6 +1262,8 @@ define([ if (!this.appOptions.isEditDiagram && !this.appOptions.isEditMailMerge) { this.appOptions.canBrandingExt = params.asc_getCanBranding() && (typeof this.editorConfig.customization == 'object' || this.editorConfig.plugins); this.getApplication().getController('Common.Controllers.Plugins').setMode(this.appOptions); + this.appOptions.canBrandingExt && this.editorConfig.customization && Common.UI.LayoutManager.init(this.editorConfig.customization.layout); + this.appOptions.canBrandingExt && this.editorConfig.customization && Common.UI.FeaturesManager.init(this.editorConfig.customization.features); } this.appOptions.canUseHistory = this.appOptions.canLicense && this.editorConfig.canUseHistory && this.appOptions.canCoAuthoring && !this.appOptions.isOffline; @@ -2051,6 +2058,13 @@ define([ Common.Utils.applyCustomization(this.appOptions.customization, mapCustomizationElements); if (this.appOptions.canBrandingExt) { Common.Utils.applyCustomization(this.appOptions.customization, mapCustomizationExtElements); + Common.UI.LayoutManager.applyCustomization(); + if (this.appOptions.customization && (typeof (this.appOptions.customization) == 'object')) { + if (this.appOptions.customization.leftMenu!==undefined) + console.log("Obsolete: The 'leftMenu' parameter of the 'customization' section is deprecated. Please use 'leftMenu' parameter in the 'customization.layout' section instead."); + if (this.appOptions.customization.rightMenu!==undefined) + console.log("Obsolete: The 'rightMenu' parameter of the 'customization' section is deprecated. Please use 'rightMenu' parameter in the 'customization.layout' section instead."); + } promise = this.getApplication().getController('Common.Controllers.Plugins').applyUICustomization(); } } diff --git a/apps/spreadsheeteditor/main/app/controller/Toolbar.js b/apps/spreadsheeteditor/main/app/controller/Toolbar.js index 0e1080b31..0bd5ad38f 100644 --- a/apps/spreadsheeteditor/main/app/controller/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/controller/Toolbar.js @@ -3714,11 +3714,11 @@ define([ me.toolbar.render(_.extend({isCompactView: compactview}, config)); if ( !config.isEditDiagram && !config.isEditMailMerge ) { - var tab = {action: 'review', caption: me.toolbar.textTabCollaboration}; + var tab = {action: 'review', caption: me.toolbar.textTabCollaboration, layoutname: 'toolbar-collaboration'}; var $panel = me.getApplication().getController('Common.Controllers.ReviewChanges').createToolbarPanel(); if ($panel) { me.toolbar.addTab(tab, $panel, 6); - me.toolbar.setVisible('review', config.isEdit || config.canViewReview || config.canCoAuthoring && config.canComments); + me.toolbar.setVisible('review', (config.isEdit || config.canViewReview || config.canCoAuthoring && config.canComments) && Common.UI.LayoutManager.isElementVisible('toolbar-collaboration')); } } @@ -3777,7 +3777,7 @@ define([ me.toolbar.btnCopy.$el.removeClass('split'); } - var tab = {action: 'protect', caption: me.toolbar.textTabProtect}; + var tab = {action: 'protect', caption: me.toolbar.textTabProtect, layoutname: 'toolbar-protect'}; var $panel = me.getApplication().getController('Common.Controllers.Protection').createToolbarPanel(); if ($panel) { config.canProtect && $panel.append($('
    ')); diff --git a/apps/spreadsheeteditor/main/app/template/FileMenu.template b/apps/spreadsheeteditor/main/app/template/FileMenu.template index 8bb022a44..335e29ba6 100644 --- a/apps/spreadsheeteditor/main/app/template/FileMenu.template +++ b/apps/spreadsheeteditor/main/app/template/FileMenu.template @@ -1,6 +1,6 @@
  • -
  • +
  • @@ -14,11 +14,11 @@
  • -
  • +
  • -
  • +
  • diff --git a/apps/spreadsheeteditor/main/app/template/LeftMenu.template b/apps/spreadsheeteditor/main/app/template/LeftMenu.template index c11a45dac..1075eed4b 100644 --- a/apps/spreadsheeteditor/main/app/template/LeftMenu.template +++ b/apps/spreadsheeteditor/main/app/template/LeftMenu.template @@ -6,7 +6,7 @@ - +
    diff --git a/apps/spreadsheeteditor/main/app/template/Viewport.template b/apps/spreadsheeteditor/main/app/template/Viewport.template index bdec29548..3104c7962 100644 --- a/apps/spreadsheeteditor/main/app/template/Viewport.template +++ b/apps/spreadsheeteditor/main/app/template/Viewport.template @@ -7,7 +7,7 @@
    -
    +
    @@ -15,7 +15,7 @@
    -
    +
    diff --git a/apps/spreadsheeteditor/main/app/view/FileMenu.js b/apps/spreadsheeteditor/main/app/view/FileMenu.js index 89f3ce5af..7fb0ebbb7 100644 --- a/apps/spreadsheeteditor/main/app/view/FileMenu.js +++ b/apps/spreadsheeteditor/main/app/view/FileMenu.js @@ -74,6 +74,16 @@ define([ render: function () { var $markup = $(this.template()); + this.miClose = new Common.UI.MenuItem({ + el : $markup.elementById('#fm-btn-return'), + action : 'back', + caption : this.btnCloseMenuCaption, + canFocused: false, + dataHint: 1, + dataHintDirection: 'left-top', + dataHintOffset: [2, 14] + }); + this.miSave = new Common.UI.MenuItem({ el : $markup.elementById('#fm-btn-save'), action : 'save', @@ -187,6 +197,16 @@ define([ dataHintOffset: [2, 14] }); + this.miInfo = new Common.UI.MenuItem({ + el : $markup.elementById('#fm-btn-info'), + action : 'info', + caption : this.btnInfoCaption, + canFocused: false, + dataHint: 1, + dataHintDirection: 'left-top', + dataHintOffset: [2, 14] + }); + this.miAccess = new Common.UI.MenuItem({ el : $markup.elementById('#fm-btn-rights'), action : 'rights', @@ -227,17 +247,19 @@ define([ dataHintOffset: [2, 14] }); + this.miBack = new Common.UI.MenuItem({ + el : $markup.elementById('#fm-btn-back'), + action : 'exit', + caption : this.btnBackCaption, + canFocused: false, + dataHint: 1, + dataHintDirection: 'left-top', + dataHintOffset: [2, 14] + }); + this.items = []; this.items.push( - new Common.UI.MenuItem({ - el : $markup.elementById('#fm-btn-return'), - action : 'back', - caption : this.btnCloseMenuCaption, - canFocused: false, - dataHint: 1, - dataHintDirection: 'left-top', - dataHintOffset: [2, 14] - }), + this.miClose, this.miSave, this.miEdit, this.miDownload, @@ -248,28 +270,12 @@ define([ this.miProtect, this.miRecent, this.miNew, - new Common.UI.MenuItem({ - el : $markup.elementById('#fm-btn-info'), - action : 'info', - caption : this.btnInfoCaption, - canFocused: false, - dataHint: 1, - dataHintDirection: 'left-top', - dataHintOffset: [2, 14] - }), + this.miInfo, this.miAccess, this.miHistory, this.miSettings, this.miHelp, - new Common.UI.MenuItem({ - el : $markup.elementById('#fm-btn-back'), - action : 'exit', - caption : this.btnBackCaption, - canFocused: false, - dataHint: 1, - dataHintDirection: 'left-top', - dataHintOffset: [2, 14] - }) + this.miBack ); this.rendered = true; @@ -336,6 +342,14 @@ define([ if (!this.mode) return; + var lastSeparator, + separatorVisible = false; + + var isVisible = Common.UI.LayoutManager.isElementVisible('toolbar-file-close'); + this.miClose[isVisible?'show':'hide'](); + this.miClose.$el.find('+.devider')[isVisible?'show':'hide'](); + isVisible && (lastSeparator = this.miClose.$el.find('+.devider')); + this.miDownload[(this.mode.canDownload && (!this.mode.isDesktopApp || !this.mode.isOffline))?'show':'hide'](); var isBCSupport = window["AscDesktopEditor"] ? window["AscDesktopEditor"]["isBlockchainSupport"]() : false; this.miSaveCopyAs[(this.mode.canDownload && (!this.mode.isDesktopApp || !this.mode.isOffline)) && (this.mode.canRequestSaveAs || this.mode.saveAsUrl) && !isBCSupport ?'show':'hide'](); @@ -345,26 +359,50 @@ define([ this.miPrint[this.mode.canPrint?'show':'hide'](); this.miRename[(this.mode.canRename && !this.mode.isDesktopApp) ?'show':'hide'](); this.miProtect[this.mode.canProtect ?'show':'hide'](); - var isVisible = this.mode.canDownload || this.mode.isEdit || this.mode.canPrint || this.mode.canProtect || - !this.mode.isEdit && this.mode.canEdit && this.mode.canRequestEditRights || this.mode.canRename && !this.mode.isDesktopApp; - this.miProtect.$el.find('+.devider')[isVisible && !this.mode.isDisconnected?'show':'hide'](); + separatorVisible = (this.mode.canDownload || this.mode.isEdit || this.mode.canPrint || this.mode.canProtect || + !this.mode.isEdit && this.mode.canEdit && this.mode.canRequestEditRights || this.mode.canRename && !this.mode.isDesktopApp) && !this.mode.isDisconnected; + this.miProtect.$el.find('+.devider')[separatorVisible?'show':'hide'](); + separatorVisible && (lastSeparator = this.miProtect.$el.find('+.devider')); + this.miRecent[this.mode.canOpenRecent?'show':'hide'](); this.miNew[this.mode.canCreateNew?'show':'hide'](); - this.miNew.$el.find('+.devider')[this.mode.canCreateNew?'show':'hide'](); + separatorVisible = this.mode.canCreateNew; + this.miNew.$el.find('+.devider')[separatorVisible?'show':'hide'](); + separatorVisible && (lastSeparator = this.miNew.$el.find('+.devider')); - this.miAccess[(!this.mode.isOffline && this.document&&this.document.info&&(this.document.info.sharingSettings&&this.document.info.sharingSettings.length>0 || - (this.mode.sharingSettingsUrl&&this.mode.sharingSettingsUrl.length || this.mode.canRequestSharingSettings)))?'show':'hide'](); + isVisible = Common.UI.LayoutManager.isElementVisible('toolbar-file-info'); + separatorVisible = isVisible; + this.miInfo[isVisible?'show':'hide'](); + isVisible = !this.mode.isOffline && this.document&&this.document.info && + (this.document.info.sharingSettings&&this.document.info.sharingSettings.length>0 || + (this.mode.sharingSettingsUrl&&this.mode.sharingSettingsUrl.length || this.mode.canRequestSharingSettings)); + separatorVisible = separatorVisible || isVisible; + this.miAccess[isVisible?'show':'hide'](); + isVisible = this.mode.canUseHistory&&!this.mode.isDisconnected; + separatorVisible = separatorVisible || isVisible; + this.miHistory[isVisible?'show':'hide'](); + this.miHistory.$el.find('+.devider')[separatorVisible?'show':'hide'](); + separatorVisible && (lastSeparator = this.miHistory.$el.find('+.devider')); + + isVisible = Common.UI.LayoutManager.isElementVisible('toolbar-file-settings'); + this.miSettings[isVisible?'show':'hide'](); + this.miSettings.$el.find('+.devider')[isVisible?'show':'hide'](); + isVisible && (lastSeparator = this.miSettings.$el.find('+.devider')); + + isVisible = this.mode.canHelp; + this.miHelp[isVisible ?'show':'hide'](); + this.miHelp.$el.find('+.devider')[isVisible?'show':'hide'](); + isVisible && (lastSeparator = this.miHelp.$el.find('+.devider')); + + isVisible = this.mode.canBack; + this.miBack[isVisible ?'show':'hide'](); + lastSeparator && !isVisible && lastSeparator.hide(); - this.mode.canBack ? this.$el.find('#fm-btn-back').show().prev().show() : - this.$el.find('#fm-btn-back').hide().prev().hide(); if (!this.customizationDone) { this.customizationDone = true; Common.Utils.applyCustomization(this.mode.customization, {goback: '#fm-btn-back > a'}); } - this.miHelp[this.mode.canHelp ?'show':'hide'](); - this.miHelp.$el.prev()[this.mode.canHelp ?'show':'hide'](); - this.panels['opts'].setMode(this.mode); this.panels['info'].setMode(this.mode); !this.mode.isDisconnected && this.panels['info'].updateInfo(this.document); @@ -400,8 +438,6 @@ define([ this.panels['help'].setLangConfig(this.mode.lang); } - this.miHistory[this.mode.canUseHistory&&!this.mode.isDisconnected?'show':'hide'](); - if ( this.mode.disableEditing != undefined ) { this.panels['opts'].SetDisabled(this.mode.disableEditing); delete this.mode.disableEditing; diff --git a/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js b/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js index 1367681ec..8d15242fe 100644 --- a/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js +++ b/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js @@ -1491,18 +1491,18 @@ define([ template: _.template([ '
    ', - '', + '', '', '', '', - '', + '', '', '', '', - '', + '', '', '', - '','', + '','', '', '', '', @@ -1584,6 +1584,7 @@ define([ setMode: function(mode) { this.mode = mode; + $('tr.spellcheck', this.el)[Common.UI.FeaturesManager.canChange('spellcheck') ? 'show' : 'hide'](); }, setApi: function(api) { @@ -1591,6 +1592,8 @@ define([ }, updateSettings: function() { + if (!Common.UI.FeaturesManager.canChange('spellcheck')) return; + var arrLang = SSE.getController('Spellcheck').loadLanguages(), allLangs = arrLang[0], langs = arrLang[1], @@ -1627,6 +1630,8 @@ define([ }, applySettings: function() { + if (!Common.UI.FeaturesManager.canChange('spellcheck')) return; + var value = this.chIgnoreUppercase.isChecked(); Common.localStorage.setBool("sse-spellcheck-ignore-uppercase-words", value); Common.Utils.InternalSettings.set("sse-spellcheck-ignore-uppercase-words", value); diff --git a/apps/spreadsheeteditor/main/app/view/Toolbar.js b/apps/spreadsheeteditor/main/app/view/Toolbar.js index a975163ae..e3cc02ea1 100644 --- a/apps/spreadsheeteditor/main/app/view/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/view/Toolbar.js @@ -353,10 +353,10 @@ define([ Common.UI.Mixtbar.prototype.initialize.call(this, { template: _.template(template), tabs: [ - { caption: me.textTabFile, action: 'file', extcls: 'canedit', haspanel:false}, + { caption: me.textTabFile, action: 'file', extcls: 'canedit', layoutname: 'toolbar-file', haspanel:false}, { caption: me.textTabHome, action: 'home', extcls: 'canedit'}, { caption: me.textTabInsert, action: 'ins', extcls: 'canedit'}, - {caption: me.textTabLayout, action: 'layout', extcls: 'canedit'}, + {caption: me.textTabLayout, action: 'layout', extcls: 'canedit', layoutname: 'toolbar-layout'}, {caption: me.textTabFormula, action: 'formula', extcls: 'canedit'}, {caption: me.textTabData, action: 'data', extcls: 'canedit'}, undefined, undefined, undefined, @@ -1616,7 +1616,7 @@ define([ Common.UI.Mixtbar.prototype.initialize.call(this, { template: _.template(template_view), tabs: [ - {caption: me.textTabFile, action: 'file', haspanel:false} + {caption: me.textTabFile, action: 'file', layoutname: 'toolbar-file', haspanel:false} ] } ); diff --git a/apps/spreadsheeteditor/main/index.html b/apps/spreadsheeteditor/main/index.html index c0f50cf8d..72f5aa2c4 100644 --- a/apps/spreadsheeteditor/main/index.html +++ b/apps/spreadsheeteditor/main/index.html @@ -41,7 +41,7 @@ border: none; background: #e2e2e2; background: var(--canvas-background, #e2e2e2); - z-index: 1001; + z-index: 1002; } .loadmask > .brendpanel { diff --git a/apps/spreadsheeteditor/main/index.html.deploy b/apps/spreadsheeteditor/main/index.html.deploy index 609a47f39..a29e4adb1 100644 --- a/apps/spreadsheeteditor/main/index.html.deploy +++ b/apps/spreadsheeteditor/main/index.html.deploy @@ -20,7 +20,7 @@ border: none; background: #e2e2e2; background: var(--canvas-background, #e2e2e2); - z-index: 1001; + z-index: 1002; } .loadmask > .brendpanel { diff --git a/apps/spreadsheeteditor/main/index_loader.html b/apps/spreadsheeteditor/main/index_loader.html index e74a44f25..bb8750fce 100644 --- a/apps/spreadsheeteditor/main/index_loader.html +++ b/apps/spreadsheeteditor/main/index_loader.html @@ -20,7 +20,7 @@ overflow: hidden; border: none; background-color: #f4f4f4; - z-index: 1001; + z-index: 1002; } .loader-page { width: 100%; diff --git a/apps/spreadsheeteditor/main/index_loader.html.deploy b/apps/spreadsheeteditor/main/index_loader.html.deploy index a221fcab1..a151718cb 100644 --- a/apps/spreadsheeteditor/main/index_loader.html.deploy +++ b/apps/spreadsheeteditor/main/index_loader.html.deploy @@ -23,7 +23,7 @@ overflow: hidden; border: none; background-color: #f4f4f4; - z-index: 1001; + z-index: 1002; } .loader-page {