From 6bd108dd3ac38391e82578c9b24dbfbec7fb7f49 Mon Sep 17 00:00:00 2001 From: Maxim Kadushkin Date: Tue, 30 Nov 2021 20:13:56 +0300 Subject: [PATCH] [SSE PE] for bug 53723 --- .../main/app/view/FileMenu.js | 31 ++++++++++++++++++- apps/presentationeditor/main/locale/en.json | 2 ++ .../main/app/view/FileMenu.js | 31 ++++++++++++++++++- apps/spreadsheeteditor/main/locale/en.json | 2 ++ 4 files changed, 64 insertions(+), 2 deletions(-) diff --git a/apps/presentationeditor/main/app/view/FileMenu.js b/apps/presentationeditor/main/app/view/FileMenu.js index bace6099b..f4b5e55e6 100644 --- a/apps/presentationeditor/main/app/view/FileMenu.js +++ b/apps/presentationeditor/main/app/view/FileMenu.js @@ -417,6 +417,33 @@ define([ } this.miHistory[this.mode.canUseHistory&&!this.mode.isDisconnected?'show':'hide'](); + + if ( Common.Controllers.Desktop.isActive() ) { + $('
  • ').insertAfter($('#fm-btn-recent', this.$el)); + this.items.push( + new Common.UI.MenuItem({ + el : $('#fm-btn-local-open', this.$el), + action : 'file:open', + caption : this.btnFileOpenCaption, + canFocused: false, + dataHint: 1, + dataHintDirection: 'left-top', + dataHintOffset: [2, 14] + })); + + $('
  • ' + + '
  • ').insertAfter($('#fm-btn-back', this.$el)); + this.items.push( + new Common.UI.MenuItem({ + el : $('#fm-btn-exit', this.$el), + action : 'file:exit', + caption : this.btnExitCaption, + canFocused: false, + dataHint: 1, + dataHintDirection: 'left-top', + dataHintOffset: [2, 14] + })); + } }, setMode: function(mode, delay) { @@ -563,6 +590,8 @@ define([ btnCloseMenuCaption : 'Close Menu', btnProtectCaption: 'Protect', btnSaveCopyAsCaption : 'Save Copy as...', - btnHistoryCaption : 'Versions History' + btnHistoryCaption : 'Versions History', + btnExitCaption : 'Exit', + btnFileOpenCaption : 'Open...' }, PE.Views.FileMenu || {})); }); diff --git a/apps/presentationeditor/main/locale/en.json b/apps/presentationeditor/main/locale/en.json index c9c567bb6..65305a9e9 100644 --- a/apps/presentationeditor/main/locale/en.json +++ b/apps/presentationeditor/main/locale/en.json @@ -1314,6 +1314,8 @@ "PE.Views.FileMenu.btnSaveCopyAsCaption": "Save Copy as...", "PE.Views.FileMenu.btnSettingsCaption": "Advanced Settings...", "PE.Views.FileMenu.btnToEditCaption": "Edit Presentation", + "PE.Views.FileMenu.btnExitCaption": "Exit", + "PE.Views.FileMenu.btnFileOpenCaption": "Open...", "PE.Views.FileMenuPanels.CreateNew.txtBlank": "Blank Presentation", "PE.Views.FileMenuPanels.CreateNew.txtCreateNew": "Create New", "PE.Views.FileMenuPanels.DocumentInfo.okButtonText": "Apply", diff --git a/apps/spreadsheeteditor/main/app/view/FileMenu.js b/apps/spreadsheeteditor/main/app/view/FileMenu.js index 95c97e58e..2a3846989 100644 --- a/apps/spreadsheeteditor/main/app/view/FileMenu.js +++ b/apps/spreadsheeteditor/main/app/view/FileMenu.js @@ -408,6 +408,33 @@ define([ this.panels['opts'].SetDisabled(this.mode.disableEditing); delete this.mode.disableEditing; } + + if ( Common.Controllers.Desktop.isActive() ) { + $('
  • ').insertAfter($('#fm-btn-recent', this.$el)); + this.items.push( + new Common.UI.MenuItem({ + el : $('#fm-btn-local-open', this.$el), + action : 'file:open', + caption : this.btnFileOpenCaption, + canFocused: false, + dataHint: 1, + dataHintDirection: 'left-top', + dataHintOffset: [2, 14] + })); + + $('
  • ' + + '
  • ').insertAfter($('#fm-btn-back', this.$el)); + this.items.push( + new Common.UI.MenuItem({ + el : $('#fm-btn-exit', this.$el), + action : 'file:exit', + caption : this.btnExitCaption, + canFocused: false, + dataHint: 1, + dataHintDirection: 'left-top', + dataHintOffset: [2, 14] + })); + } }, setMode: function(mode, delay) { @@ -539,6 +566,8 @@ define([ btnCloseMenuCaption : 'Close Menu', btnProtectCaption: 'Protect', btnSaveCopyAsCaption : 'Save Copy as...', - btnHistoryCaption : 'Versions History' + btnHistoryCaption : 'Versions History', + btnExitCaption : 'Exit', + btnFileOpenCaption : 'Open...' }, SSE.Views.FileMenu || {})); }); diff --git a/apps/spreadsheeteditor/main/locale/en.json b/apps/spreadsheeteditor/main/locale/en.json index 4054b0dc5..86f3546ab 100644 --- a/apps/spreadsheeteditor/main/locale/en.json +++ b/apps/spreadsheeteditor/main/locale/en.json @@ -2009,6 +2009,8 @@ "SSE.Views.FileMenu.btnSaveCopyAsCaption": "Save Copy as...", "SSE.Views.FileMenu.btnSettingsCaption": "Advanced Settings...", "SSE.Views.FileMenu.btnToEditCaption": "Edit Spreadsheet", + "SSE.Views.FileMenu.btnExitCaption": "Exit", + "SSE.Views.FileMenu.btnFileOpenCaption": "Open...", "SSE.Views.FileMenuPanels.CreateNew.txtBlank": "Blank Spreadsheet", "SSE.Views.FileMenuPanels.CreateNew.txtCreateNew": "Create New", "SSE.Views.FileMenuPanels.DocumentInfo.okButtonText": "Apply",