From 4354a26a9b0e89a52934f67ad4a04a23fc5bf1d7 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Thu, 18 Nov 2021 17:46:14 +0300 Subject: [PATCH 1/3] Hide save buttons --- apps/api/documents/api.js | 3 +++ apps/common/main/lib/view/Header.js | 2 +- apps/documenteditor/main/app/template/FileMenu.template | 2 +- apps/documenteditor/main/app/template/Toolbar.template | 2 +- apps/documenteditor/main/app/view/FileMenu.js | 4 ++-- apps/presentationeditor/main/app/template/FileMenu.template | 2 +- apps/presentationeditor/main/app/template/Toolbar.template | 2 +- apps/presentationeditor/main/app/view/FileMenu.js | 4 ++-- apps/spreadsheeteditor/main/app/template/FileMenu.template | 2 +- apps/spreadsheeteditor/main/app/template/Toolbar.template | 2 +- apps/spreadsheeteditor/main/app/view/FileMenu.js | 4 ++-- 11 files changed, 16 insertions(+), 13 deletions(-) diff --git a/apps/api/documents/api.js b/apps/api/documents/api.js index 6ed0161904..f9bd4b6c40 100644 --- a/apps/api/documents/api.js +++ b/apps/api/documents/api.js @@ -151,6 +151,7 @@ close: false / true, // close menu button settings: false / true, // advanced settings info: false / true // document info + save: false/true // save button } / false / true, home: { mailmerge: false/true // mail merge button @@ -160,9 +161,11 @@ collaboration: false / true // collaboration tab protect: false / true, // protect tab plugins: false / true // plugins tab + save: false/true // save button on toolbar in }, header: { users: false/true // users list button + save: false/true // save button }, leftMenu: { navigation: false/true, diff --git a/apps/common/main/lib/view/Header.js b/apps/common/main/lib/view/Header.js index da94a37bbd..bcacd43bcb 100644 --- a/apps/common/main/lib/view/Header.js +++ b/apps/common/main/lib/view/Header.js @@ -118,7 +118,7 @@ define([ var templateTitleBox = '
' + '
' + '
' + - '
' + + '
' + '
' + '
' + '
' + diff --git a/apps/documenteditor/main/app/template/FileMenu.template b/apps/documenteditor/main/app/template/FileMenu.template index 335e29ba6a..3ad620221c 100644 --- a/apps/documenteditor/main/app/template/FileMenu.template +++ b/apps/documenteditor/main/app/template/FileMenu.template @@ -2,7 +2,7 @@
  • -
  • +
  • diff --git a/apps/documenteditor/main/app/template/Toolbar.template b/apps/documenteditor/main/app/template/Toolbar.template index 8e7a785248..ac80362c1a 100644 --- a/apps/documenteditor/main/app/template/Toolbar.template +++ b/apps/documenteditor/main/app/template/Toolbar.template @@ -11,7 +11,7 @@
    - +
    diff --git a/apps/documenteditor/main/app/view/FileMenu.js b/apps/documenteditor/main/app/view/FileMenu.js index e63099a3dc..927efa41f3 100644 --- a/apps/documenteditor/main/app/view/FileMenu.js +++ b/apps/documenteditor/main/app/view/FileMenu.js @@ -369,12 +369,12 @@ define([ 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'](); this.miSaveAs[((this.mode.canDownload || this.mode.canDownloadOrigin) && this.mode.isDesktopApp && this.mode.isOffline)?'show':'hide'](); - this.miSave[this.mode.isEdit?'show':'hide'](); + this.miSave[this.mode.isEdit && Common.UI.LayoutManager.isElementVisible('toolbar-file-save') ?'show':'hide'](); this.miEdit[!this.mode.isEdit && this.mode.canEdit && this.mode.canRequestEditRights ?'show':'hide'](); this.miPrint[this.mode.canPrint?'show':'hide'](); this.miRename[(this.mode.canRename && !this.mode.isDesktopApp) ?'show':'hide'](); this.miProtect[this.mode.canProtect ?'show':'hide'](); - separatorVisible = (this.mode.canDownload || this.mode.canDownloadOrigin || this.mode.isEdit || this.mode.canPrint || this.mode.canProtect || + separatorVisible = (this.mode.canDownload || this.mode.canDownloadOrigin || this.mode.isEdit && Common.UI.LayoutManager.isElementVisible('toolbar-file-save') || 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')); diff --git a/apps/presentationeditor/main/app/template/FileMenu.template b/apps/presentationeditor/main/app/template/FileMenu.template index 335e29ba6a..3ad620221c 100644 --- a/apps/presentationeditor/main/app/template/FileMenu.template +++ b/apps/presentationeditor/main/app/template/FileMenu.template @@ -2,7 +2,7 @@
  • -
  • +
  • diff --git a/apps/presentationeditor/main/app/template/Toolbar.template b/apps/presentationeditor/main/app/template/Toolbar.template index a771d2830d..dbe7e200eb 100644 --- a/apps/presentationeditor/main/app/template/Toolbar.template +++ b/apps/presentationeditor/main/app/template/Toolbar.template @@ -11,7 +11,7 @@
    - +
    diff --git a/apps/presentationeditor/main/app/view/FileMenu.js b/apps/presentationeditor/main/app/view/FileMenu.js index 139753fe7e..ef195852c0 100644 --- a/apps/presentationeditor/main/app/view/FileMenu.js +++ b/apps/presentationeditor/main/app/view/FileMenu.js @@ -370,12 +370,12 @@ define([ 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'](); this.miSaveAs[(this.mode.canDownload && this.mode.isDesktopApp && this.mode.isOffline)?'show':'hide'](); - this.miSave[this.mode.isEdit?'show':'hide'](); + this.miSave[this.mode.isEdit && Common.UI.LayoutManager.isElementVisible('toolbar-file-save') ?'show':'hide'](); this.miEdit[!this.mode.isEdit && this.mode.canEdit && this.mode.canRequestEditRights ?'show':'hide'](); this.miPrint[this.mode.canPrint?'show':'hide'](); this.miRename[(this.mode.canRename && !this.mode.isDesktopApp) ?'show':'hide'](); this.miProtect[this.mode.canProtect ?'show':'hide'](); - separatorVisible = (this.mode.canDownload || this.mode.isEdit || this.mode.canPrint || this.mode.canProtect || + separatorVisible = (this.mode.canDownload || this.mode.isEdit && Common.UI.LayoutManager.isElementVisible('toolbar-file-save') || 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')); diff --git a/apps/spreadsheeteditor/main/app/template/FileMenu.template b/apps/spreadsheeteditor/main/app/template/FileMenu.template index 335e29ba6a..3ad620221c 100644 --- a/apps/spreadsheeteditor/main/app/template/FileMenu.template +++ b/apps/spreadsheeteditor/main/app/template/FileMenu.template @@ -2,7 +2,7 @@
  • -
  • +
  • diff --git a/apps/spreadsheeteditor/main/app/template/Toolbar.template b/apps/spreadsheeteditor/main/app/template/Toolbar.template index c76a111d35..25f747f475 100644 --- a/apps/spreadsheeteditor/main/app/template/Toolbar.template +++ b/apps/spreadsheeteditor/main/app/template/Toolbar.template @@ -11,7 +11,7 @@
    - +
    diff --git a/apps/spreadsheeteditor/main/app/view/FileMenu.js b/apps/spreadsheeteditor/main/app/view/FileMenu.js index 7fb0ebbb7f..1db8dfca8e 100644 --- a/apps/spreadsheeteditor/main/app/view/FileMenu.js +++ b/apps/spreadsheeteditor/main/app/view/FileMenu.js @@ -354,12 +354,12 @@ define([ 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'](); this.miSaveAs[(this.mode.canDownload && this.mode.isDesktopApp && this.mode.isOffline)?'show':'hide'](); - this.miSave[this.mode.isEdit?'show':'hide'](); + this.miSave[this.mode.isEdit && Common.UI.LayoutManager.isElementVisible('toolbar-file-save') ?'show':'hide'](); this.miEdit[!this.mode.isEdit && this.mode.canEdit && this.mode.canRequestEditRights ?'show':'hide'](); this.miPrint[this.mode.canPrint?'show':'hide'](); this.miRename[(this.mode.canRename && !this.mode.isDesktopApp) ?'show':'hide'](); this.miProtect[this.mode.canProtect ?'show':'hide'](); - separatorVisible = (this.mode.canDownload || this.mode.isEdit || this.mode.canPrint || this.mode.canProtect || + separatorVisible = (this.mode.canDownload || this.mode.isEdit && Common.UI.LayoutManager.isElementVisible('toolbar-file-save') || 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')); From 1bcb9711e2f038ac85cabea2355fd333c97a6262 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Thu, 18 Nov 2021 20:53:29 +0300 Subject: [PATCH 2/3] [DE][PE] Hide operation status in status bar --- apps/api/documents/api.js | 1 + apps/documenteditor/main/app/template/StatusBar.template | 2 +- apps/presentationeditor/main/app/template/StatusBar.template | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/api/documents/api.js b/apps/api/documents/api.js index f9bd4b6c40..f3f585300b 100644 --- a/apps/api/documents/api.js +++ b/apps/api/documents/api.js @@ -175,6 +175,7 @@ statusBar: { textLang: false/true // text language button in de/pe docLang: false/true // document language button in de/pe + actionStatus: false/true // status of operation } }, features: { // disable feature diff --git a/apps/documenteditor/main/app/template/StatusBar.template b/apps/documenteditor/main/app/template/StatusBar.template index be9b9bf309..9025b74a2f 100644 --- a/apps/documenteditor/main/app/template/StatusBar.template +++ b/apps/documenteditor/main/app/template/StatusBar.template @@ -8,7 +8,7 @@
    - +
    diff --git a/apps/presentationeditor/main/app/template/StatusBar.template b/apps/presentationeditor/main/app/template/StatusBar.template index a175b6f56f..9231453f08 100644 --- a/apps/presentationeditor/main/app/template/StatusBar.template +++ b/apps/presentationeditor/main/app/template/StatusBar.template @@ -24,7 +24,7 @@
    - +
    From d974fcfe169191f91dd925e183f722a3f3a086ce Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Thu, 18 Nov 2021 23:56:29 +0300 Subject: [PATCH 3/3] [SSE] Hide operation status in status bar --- apps/spreadsheeteditor/main/app/controller/Statusbar.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/spreadsheeteditor/main/app/controller/Statusbar.js b/apps/spreadsheeteditor/main/app/controller/Statusbar.js index 47c5c0e53c..cdbbfb5e3f 100644 --- a/apps/spreadsheeteditor/main/app/controller/Statusbar.js +++ b/apps/spreadsheeteditor/main/app/controller/Statusbar.js @@ -254,6 +254,11 @@ define([ this.statusbar.$el.css('z-index', ''); this.statusbar.tabMenu.on('item:click', _.bind(this.onTabMenu, this)); this.statusbar.btnAddWorksheet.on('click', _.bind(this.onAddWorksheetClick, this)); + if (!Common.UI.LayoutManager.isElementVisible('statusBar-actionStatus')) { + this.statusbar.customizeStatusBarMenu.items[0].setVisible(false); + this.statusbar.customizeStatusBarMenu.items[1].setVisible(false); + this.statusbar.boxAction.addClass('hide'); + } Common.NotificationCenter.on('window:resize', _.bind(this.onWindowResize, this)); Common.NotificationCenter.on('cells:range', _.bind(this.onRangeDialogMode, this));