From ee15f9d250534a2be6a896032cb7aa14a4ccc3c5 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Mon, 29 Jul 2019 15:50:55 +0300 Subject: [PATCH] Fix inserting image from storage --- apps/documenteditor/main/app/view/Toolbar.js | 2 +- apps/presentationeditor/main/app/view/Toolbar.js | 2 +- apps/spreadsheeteditor/main/app/view/Toolbar.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/documenteditor/main/app/view/Toolbar.js b/apps/documenteditor/main/app/view/Toolbar.js index ccb569908..f6efa669c 100644 --- a/apps/documenteditor/main/app/view/Toolbar.js +++ b/apps/documenteditor/main/app/view/Toolbar.js @@ -2055,7 +2055,7 @@ define([ this.listStylesAdditionalMenuItem.setVisible(mode.canEditStyles); this.btnContentControls.menu.items[4].setVisible(mode.canEditContentControl); this.btnContentControls.menu.items[5].setVisible(mode.canEditContentControl); - this.mnuInsertImage.items[2].setVisible(this.mode.fileChoiceUrl && this.mode.fileChoiceUrl.indexOf("{documentType}")>-1); + this.mnuInsertImage.items[2].setVisible(this.mode.canRequestInsertImage || this.mode.fileChoiceUrl && this.mode.fileChoiceUrl.indexOf("{documentType}")>-1); }, onSendThemeColorSchemes: function (schemas) { diff --git a/apps/presentationeditor/main/app/view/Toolbar.js b/apps/presentationeditor/main/app/view/Toolbar.js index c71d95291..cd366f3aa 100644 --- a/apps/presentationeditor/main/app/view/Toolbar.js +++ b/apps/presentationeditor/main/app/view/Toolbar.js @@ -983,7 +983,7 @@ define([ me.fireEvent('insert:image', [item.value]); }) ); - btn.menu.items[2].setVisible(config.fileChoiceUrl && config.fileChoiceUrl.indexOf("{documentType}")>-1); + btn.menu.items[2].setVisible(config.canRequestInsertImage || config.fileChoiceUrl && config.fileChoiceUrl.indexOf("{documentType}")>-1); }); me.btnsInsertText.forEach(function (btn) { diff --git a/apps/spreadsheeteditor/main/app/view/Toolbar.js b/apps/spreadsheeteditor/main/app/view/Toolbar.js index cad2d4776..32cc23def 100644 --- a/apps/spreadsheeteditor/main/app/view/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/view/Toolbar.js @@ -1462,7 +1462,7 @@ define([ $(mnu.el).html(mnu.template({id: Common.UI.getId(), caption : mnu.caption, options : mnu.options})); } else this.btnPageMargins.menu.items[0].setVisible(false); - this.btnInsertImage.menu.items[2].setVisible(mode.fileChoiceUrl && mode.fileChoiceUrl.indexOf("{documentType}")>-1); + this.btnInsertImage.menu.items[2].setVisible(mode.canRequestInsertImage || mode.fileChoiceUrl && mode.fileChoiceUrl.indexOf("{documentType}")>-1); } me.setTab('home');