diff --git a/apps/documenteditor/main/app/view/DocumentHolder.js b/apps/documenteditor/main/app/view/DocumentHolder.js index f51e70a38..292e00327 100644 --- a/apps/documenteditor/main/app/view/DocumentHolder.js +++ b/apps/documenteditor/main/app/view/DocumentHolder.js @@ -2433,6 +2433,11 @@ define([ me.fireEvent('editcomplete', me); } })).show(); + }), + new Common.UI.MenuItem({ + caption : this.textFromStorage + }).on('click', function(item) { + Common.NotificationCenter.trigger('storage:image-load', 'change'); }) ] }) @@ -2579,6 +2584,7 @@ define([ menuImgReplace.setVisible(value.imgProps.isOnlyImg && (pluginGuid===null || pluginGuid===undefined)); if (menuImgReplace.isVisible()) menuImgReplace.setDisabled(islocked || pluginGuid===null); + menuImgReplace.menu.items[2].setVisible(me.mode.canRequestInsertImage || me.mode.fileChoiceUrl && me.mode.fileChoiceUrl.indexOf("{documentType}")>-1); menuImgRotate.setVisible(!value.imgProps.isChart && (pluginGuid===null || pluginGuid===undefined)); if (menuImgRotate.isVisible()) @@ -4416,7 +4422,8 @@ define([ textCells: 'Cells', textSeveral: 'Several Rows/Columns', txtInsertCaption: 'Insert Caption', - txtEmpty: '(Empty)' + txtEmpty: '(Empty)', + textFromStorage: 'From Storage' }, DE.Views.DocumentHolder || {})); }); \ No newline at end of file diff --git a/apps/documenteditor/main/locale/en.json b/apps/documenteditor/main/locale/en.json index f814e79e1..5ed3adbbf 100644 --- a/apps/documenteditor/main/locale/en.json +++ b/apps/documenteditor/main/locale/en.json @@ -1419,6 +1419,7 @@ "DE.Views.DocumentHolder.txtUngroup": "Ungroup", "DE.Views.DocumentHolder.updateStyleText": "Update %1 style", "DE.Views.DocumentHolder.vertAlignText": "Vertical Alignment", + "DE.Views.DocumentHolder.textFromStorage": "From Storage", "DE.Views.DropcapSettingsAdvanced.strBorders": "Borders & Fill", "DE.Views.DropcapSettingsAdvanced.strDropcap": "Drop Cap", "DE.Views.DropcapSettingsAdvanced.strMargins": "Margins", diff --git a/apps/presentationeditor/main/app/view/DocumentHolder.js b/apps/presentationeditor/main/app/view/DocumentHolder.js index 4a51b3c0b..c7219b226 100644 --- a/apps/presentationeditor/main/app/view/DocumentHolder.js +++ b/apps/presentationeditor/main/app/view/DocumentHolder.js @@ -2848,7 +2848,12 @@ define([ }), new Common.UI.MenuItem({ caption : this.textFromUrl - }).on('click', _.bind(me.onInsertImageUrl, me, false)) + }).on('click', _.bind(me.onInsertImageUrl, me, false)), + new Common.UI.MenuItem({ + caption : this.textFromStorage + }).on('click', function(item) { + Common.NotificationCenter.trigger('storage:image-load', 'change'); + }) ] }) }); @@ -3357,7 +3362,8 @@ define([ menuImgReplace.setVisible(isimage && (pluginGuid===null || pluginGuid===undefined)); if (menuImgReplace.isVisible()) menuImgReplace.setDisabled(disabled || pluginGuid===null); - + menuImgReplace.menu.items[2].setVisible(me.mode.canRequestInsertImage || me.mode.fileChoiceUrl && me.mode.fileChoiceUrl.indexOf("{documentType}")>-1); + me.menuImgCrop.setVisible(me.api.asc_canEditCrop()); if (me.menuImgCrop.isVisible()) me.menuImgCrop.setDisabled(disabled); @@ -3811,7 +3817,8 @@ define([ txtPrintSelection: 'Print Selection', addToLayoutText: 'Add to Layout', txtResetLayout: 'Reset Slide', - mniCustomTable: 'Insert Custom Table' + mniCustomTable: 'Insert Custom Table', + textFromStorage: 'From Storage' }, PE.Views.DocumentHolder || {})); }); \ No newline at end of file diff --git a/apps/presentationeditor/main/locale/en.json b/apps/presentationeditor/main/locale/en.json index cd680f202..ef3ce513c 100644 --- a/apps/presentationeditor/main/locale/en.json +++ b/apps/presentationeditor/main/locale/en.json @@ -1156,6 +1156,7 @@ "PE.Views.DocumentHolder.txtUnderbar": "Bar under text", "PE.Views.DocumentHolder.txtUngroup": "Ungroup", "PE.Views.DocumentHolder.vertAlignText": "Vertical Alignment", + "PE.Views.DocumentHolder.textFromStorage": "From Storage", "PE.Views.DocumentPreview.goToSlideText": "Go to Slide", "PE.Views.DocumentPreview.slideIndexText": "Slide {0} of {1}", "PE.Views.DocumentPreview.txtClose": "Close slideshow", diff --git a/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js b/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js index bbb421438..bc1a4f15d 100644 --- a/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js +++ b/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js @@ -1649,6 +1649,7 @@ define([ var pluginGuid = (documentHolder.mnuImgAdvanced.imageInfo) ? documentHolder.mnuImgAdvanced.imageInfo.asc_getPluginGuid() : null; documentHolder.menuImgReplace.setVisible(isimageonly && (pluginGuid===null || pluginGuid===undefined)); documentHolder.menuImgReplace.setDisabled(isObjLocked || pluginGuid===null); + documentHolder.menuImgReplace.menu.items[2].setVisible(this.permissions.canRequestInsertImage || this.permissions.fileChoiceUrl && this.permissions.fileChoiceUrl.indexOf("{documentType}")>-1); documentHolder.menuImageArrange.setDisabled(isObjLocked); documentHolder.menuImgRotate.setVisible(!ischartmenu && (pluginGuid===null || pluginGuid===undefined)); @@ -3211,6 +3212,8 @@ define([ if (me.api) me.api.asc_changeImageFromFile(); Common.NotificationCenter.trigger('edit:complete', me.documentHolder); }, 10); + } else if (item.value == 'storage') { + Common.NotificationCenter.trigger('storage:image-load', 'change'); } else { (new Common.Views.ImageFromUrlDialog({ handler: function(result, value) { diff --git a/apps/spreadsheeteditor/main/app/view/DocumentHolder.js b/apps/spreadsheeteditor/main/app/view/DocumentHolder.js index 2e504244a..621715714 100644 --- a/apps/spreadsheeteditor/main/app/view/DocumentHolder.js +++ b/apps/spreadsheeteditor/main/app/view/DocumentHolder.js @@ -600,7 +600,8 @@ define([ menuAlign: 'tl-tr', items: [ new Common.UI.MenuItem({caption : this.textFromFile, value: 'file'}), - new Common.UI.MenuItem({caption : this.textFromUrl, value: 'url'}) + new Common.UI.MenuItem({caption : this.textFromUrl, value: 'url'}), + new Common.UI.MenuItem({caption : this.textFromStorage, value: 'storage'}) ] }) }); @@ -1098,7 +1099,8 @@ define([ textCrop: 'Crop', textCropFill: 'Fill', textCropFit: 'Fit', - textListSettings: 'List Settings' + textListSettings: 'List Settings', + textFromStorage: 'From Storage' }, SSE.Views.DocumentHolder || {})); }); \ No newline at end of file diff --git a/apps/spreadsheeteditor/main/locale/en.json b/apps/spreadsheeteditor/main/locale/en.json index 4e1823486..26cb27598 100644 --- a/apps/spreadsheeteditor/main/locale/en.json +++ b/apps/spreadsheeteditor/main/locale/en.json @@ -1575,6 +1575,7 @@ "SSE.Views.DocumentHolder.txtUngroup": "Ungroup", "SSE.Views.DocumentHolder.txtWidth": "Width", "SSE.Views.DocumentHolder.vertAlignText": "Vertical Alignment", + "SSE.Views.DocumentHolder.textFromStorage": "From Storage", "SSE.Views.FieldSettingsDialog.textTitle": "Field Settings", "SSE.Views.FieldSettingsDialog.strSubtotals": "Subtotals", "SSE.Views.FieldSettingsDialog.strLayout": "Layout",