Bug 42913: replace image from context menu
This commit is contained in:
parent
fc4de46980
commit
a3f8ade2cd
|
@ -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 || {}));
|
||||
});
|
|
@ -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",
|
||||
|
|
|
@ -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 || {}));
|
||||
});
|
|
@ -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",
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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 || {}));
|
||||
});
|
|
@ -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",
|
||||
|
|
Loading…
Reference in a new issue