[desktop] for bug 53723

This commit is contained in:
Maxim Kadushkin 2021-11-30 00:34:20 +03:00
parent de72480047
commit 73dea87360
3 changed files with 25 additions and 5 deletions

View file

@ -255,8 +255,12 @@ define([
webapp.addListeners({
'FileMenu': {
'item:click': function (menu, action, isopts) {
if ( action == 'app:exit' ) {
native.execCommand('editor:event', JSON.stringify({action: 'close'}));
if ( action == 'file:exit' ) {
native.execCommand('editor:event', JSON.stringify({action: 'file:exit'}));
menu.hide();
} else
if ( action == 'file:open' ) {
native.execCommand('editor:event', JSON.stringify({action: 'file:open'}));
menu.hide();
}
},

View file

@ -421,13 +421,25 @@ define([
this.miHistory[this.mode.canUseHistory&&!this.mode.isDisconnected?'show':'hide']();
if ( Common.Controllers.Desktop.isActive() ) {
$('<li id="fm-btn-local-open" class="fm-btn"/>').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]
}));
$('<li class="devider" />' +
'<li id="fm-btn-exit" class="fm-btn"/>').insertAfter($('#fm-btn-back', this.$el));
this.items.push(
new Common.UI.MenuItem({
el : $('#fm-btn-exit', this.$el),
action : 'app:exit',
caption : 'Exit',
action : 'file:exit',
caption : this.btnExitCaption,
canFocused: false,
dataHint: 1,
dataHintDirection: 'left-top',
@ -567,6 +579,8 @@ define([
btnRenameCaption : 'Rename...',
btnCloseMenuCaption : 'Close Menu',
btnProtectCaption: 'Protect',
btnSaveCopyAsCaption : 'Save Copy as...'
btnSaveCopyAsCaption : 'Save Copy as...',
btnExitCaption : 'Exit',
btnFileOpenCaption : 'Open...'
}, DE.Views.FileMenu || {}));
});

View file

@ -1661,6 +1661,8 @@
"DE.Views.FileMenu.btnSaveCopyAsCaption": "Save Copy as...",
"DE.Views.FileMenu.btnSettingsCaption": "Advanced Settings...",
"DE.Views.FileMenu.btnToEditCaption": "Edit Document",
"DE.Views.FileMenu.btnExitCaption": "Exit",
"DE.Views.FileMenu.btnFileOpenCaption": "Open...",
"DE.Views.FileMenu.textDownload": "Download",
"DE.Views.FileMenuPanels.CreateNew.txtBlank": "Blank Document",
"DE.Views.FileMenuPanels.CreateNew.txtCreateNew": "Create New",