Fix inserting image from storage

This commit is contained in:
Julia Radzhabova 2019-07-29 15:50:55 +03:00
parent 2652e09372
commit ee15f9d250
3 changed files with 3 additions and 3 deletions

View file

@ -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) {

View file

@ -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) {

View file

@ -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');