From 9b618a5dff58123424afb421ba8acb1171d4978c Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Tue, 15 May 2018 13:57:32 +0300 Subject: [PATCH] Fix bug when server is disconnected (open file-download as -> server is disconnected -> open file) --- apps/documenteditor/main/app/view/FileMenu.js | 2 +- apps/presentationeditor/main/app/view/FileMenu.js | 2 +- apps/spreadsheeteditor/main/app/view/FileMenu.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/documenteditor/main/app/view/FileMenu.js b/apps/documenteditor/main/app/view/FileMenu.js index 03eb65487..ec5073524 100644 --- a/apps/documenteditor/main/app/view/FileMenu.js +++ b/apps/documenteditor/main/app/view/FileMenu.js @@ -332,7 +332,7 @@ define([ if ( menu ) { var item = this._getMenuItem(menu), panel = this.panels[menu]; - if ( item.isDisabled() ) { + if ( item.isDisabled() || !item.isVisible()) { item = this._getMenuItem(defMenu); panel = this.panels[defMenu]; } diff --git a/apps/presentationeditor/main/app/view/FileMenu.js b/apps/presentationeditor/main/app/view/FileMenu.js index 88afa3a0b..cc7ac1a13 100644 --- a/apps/presentationeditor/main/app/view/FileMenu.js +++ b/apps/presentationeditor/main/app/view/FileMenu.js @@ -322,7 +322,7 @@ define([ if ( menu ) { var item = this._getMenuItem(menu), panel = this.panels[menu]; - if ( item.isDisabled() ) { + if ( item.isDisabled() || !item.isVisible()) { item = this._getMenuItem(defMenu); panel = this.panels[defMenu]; } diff --git a/apps/spreadsheeteditor/main/app/view/FileMenu.js b/apps/spreadsheeteditor/main/app/view/FileMenu.js index c00b31a93..b5f1b9149 100644 --- a/apps/spreadsheeteditor/main/app/view/FileMenu.js +++ b/apps/spreadsheeteditor/main/app/view/FileMenu.js @@ -311,7 +311,7 @@ define([ if ( menu ) { var item = this._getMenuItem(menu), panel = this.panels[menu]; - if ( item.isDisabled() ) { + if ( item.isDisabled() || !item.isVisible()) { item = this._getMenuItem(defMenu); panel = this.panels[defMenu]; }