[PE SSE] Added "show as picture" item in context menu ( Bug 59446 )
This commit is contained in:
parent
20b0c57fc9
commit
d8c4b9be3d
|
@ -427,6 +427,7 @@ define([
|
|||
view.menuParaTOCSettings.on('click', _.bind(me.onParaTOCSettings, me));
|
||||
view.menuTableEquation.menu.on('item:click', _.bind(me.convertEquation, me));
|
||||
view.menuParagraphEquation.menu.on('item:click', _.bind(me.convertEquation, me));
|
||||
view.menuSaveAsPicture.on('click', _.bind(me.saveAsPicture, me));
|
||||
|
||||
me.onChangeProtectDocument();
|
||||
},
|
||||
|
@ -2488,6 +2489,12 @@ define([
|
|||
}
|
||||
},
|
||||
|
||||
saveAsPicture: function() {
|
||||
if(this.api) {
|
||||
this.api.asc_SaveDrawingAsPicture();
|
||||
}
|
||||
},
|
||||
|
||||
onChangeProtectDocument: function(props) {
|
||||
if (!props) {
|
||||
var docprotect = this.getApplication().getController('DocProtection');
|
||||
|
|
|
@ -271,6 +271,12 @@ define([
|
|||
});
|
||||
var menuInsertCaptionSeparator = new Common.UI.MenuItem({ caption: '--' });
|
||||
|
||||
me.menuSaveAsPicture = new Common.UI.MenuItem({
|
||||
caption : me.textSaveAsPicture
|
||||
});
|
||||
|
||||
var menuSaveAsPictureSeparator = new Common.UI.MenuItem({ caption: '--'});
|
||||
|
||||
me.menuEquationInsertCaption = new Common.UI.MenuItem({
|
||||
caption : me.txtInsertCaption
|
||||
});
|
||||
|
@ -455,10 +461,6 @@ define([
|
|||
caption : me.editChartText
|
||||
});
|
||||
|
||||
var menuChartEditSeparator = new Common.UI.MenuItem({
|
||||
caption : '--'
|
||||
});
|
||||
|
||||
me.menuOriginalSize = new Common.UI.MenuItem({
|
||||
caption : me.originalSizeText
|
||||
});
|
||||
|
@ -591,10 +593,6 @@ define([
|
|||
caption: me.textEditPoints
|
||||
});
|
||||
|
||||
var menuImgEditPointsSeparator = new Common.UI.MenuItem({
|
||||
caption : '--'
|
||||
});
|
||||
|
||||
this.pictureMenu = new Common.UI.Menu({
|
||||
cls: 'shifted-right',
|
||||
restoreHeightAndTop: true,
|
||||
|
@ -703,8 +701,6 @@ define([
|
|||
if (me.menuChartEdit.isVisible())
|
||||
me.menuChartEdit.setDisabled(islocked || value.imgProps.value.get_SeveralCharts());
|
||||
|
||||
menuChartEditSeparator.setVisible(me.menuChartEdit.isVisible());
|
||||
|
||||
me.menuOriginalSize.setDisabled(islocked || value.imgProps.value.get_ImageUrl()===null || value.imgProps.value.get_ImageUrl()===undefined);
|
||||
me.menuImageAdvanced.setDisabled(islocked);
|
||||
me.menuImageAlign.setDisabled( islocked || (wrapping == Asc.c_oAscWrapStyle2.Inline) );
|
||||
|
@ -755,7 +751,6 @@ define([
|
|||
|
||||
var canEditPoints = me.api && me.api.asc_canEditGeometry();
|
||||
me.menuImgEditPoints.setVisible(canEditPoints);
|
||||
menuImgEditPointsSeparator.setVisible(canEditPoints);
|
||||
canEditPoints && me.menuImgEditPoints.setDisabled(islocked);
|
||||
},
|
||||
items: [
|
||||
|
@ -773,8 +768,6 @@ define([
|
|||
me.menuImgRemoveControl,
|
||||
me.menuImgControlSettings,
|
||||
menuImgControlSeparator,
|
||||
me.menuImgEditPoints,
|
||||
menuImgEditPointsSeparator,
|
||||
me.menuImageArrange,
|
||||
me.menuImageAlign,
|
||||
me.menuImageWrap,
|
||||
|
@ -782,11 +775,13 @@ define([
|
|||
{ caption: '--' },
|
||||
me.menuInsertCaption,
|
||||
menuInsertCaptionSeparator,
|
||||
me.menuSaveAsPicture,
|
||||
menuSaveAsPictureSeparator,
|
||||
me.menuImgCrop,
|
||||
me.menuOriginalSize,
|
||||
me.menuImgReplace,
|
||||
me.menuChartEdit,
|
||||
menuChartEditSeparator,
|
||||
me.menuImgEditPoints,
|
||||
me.menuImageAdvanced
|
||||
]
|
||||
}).on('hide:after', function(menu, e, isFromInputControl) {
|
||||
|
@ -3149,6 +3144,7 @@ define([
|
|||
textCells: 'Cells',
|
||||
textSeveral: 'Several Rows/Columns',
|
||||
txtInsertCaption: 'Insert Caption',
|
||||
textSaveAsPicture: 'Save as picture',
|
||||
txtEmpty: '(Empty)',
|
||||
textFromStorage: 'From Storage',
|
||||
advancedDropCapText: 'Drop Cap Settings',
|
||||
|
|
|
@ -1821,6 +1821,7 @@
|
|||
"DE.Views.DocumentHolder.txtInsertArgBefore": "Insert argument before",
|
||||
"DE.Views.DocumentHolder.txtInsertBreak": "Insert manual break",
|
||||
"DE.Views.DocumentHolder.txtInsertCaption": "Insert caption",
|
||||
"DE.Views.DocumentHolder.textSaveAsPicture": "Save as picture",
|
||||
"DE.Views.DocumentHolder.txtInsertEqAfter": "Insert equation after",
|
||||
"DE.Views.DocumentHolder.txtInsertEqBefore": "Insert equation before",
|
||||
"DE.Views.DocumentHolder.txtKeepTextOnly": "Keep text only",
|
||||
|
|
|
@ -1821,6 +1821,7 @@
|
|||
"DE.Views.DocumentHolder.txtInsertArgBefore": "Вставить аргумент перед",
|
||||
"DE.Views.DocumentHolder.txtInsertBreak": "Вставить принудительный разрыв",
|
||||
"DE.Views.DocumentHolder.txtInsertCaption": "Вставить название",
|
||||
"DE.Views.DocumentHolder.textSaveAsPicture": "Сохранить как рисунок",
|
||||
"DE.Views.DocumentHolder.txtInsertEqAfter": "Вставить уравнение после",
|
||||
"DE.Views.DocumentHolder.txtInsertEqBefore": "Вставить уравнение перед",
|
||||
"DE.Views.DocumentHolder.txtKeepTextOnly": "Сохранить только текст",
|
||||
|
|
|
@ -264,7 +264,9 @@ define([
|
|||
view.menuImgMacro.on('click', _.bind(me.onImgMacro, me));
|
||||
view.menuImgEditPoints.on('click', _.bind(me.onImgEditPoints, me));
|
||||
view.pmiGetRangeList.on('click', _.bind(me.onGetLink, me));
|
||||
view.menuParagraphEquation.menu.on('item:click', _.bind(me.convertEquation, me));
|
||||
view.menuParagraphEquation.menu.on('item:click', _.bind(me.convertEquation, me));
|
||||
view.menuSaveAsPicture.on('click', _.bind(me.saveAsPicture, me));
|
||||
|
||||
|
||||
if (!me.permissions.isEditMailMerge && !me.permissions.isEditDiagram && !me.permissions.isEditOle) {
|
||||
var oleEditor = me.getApplication().getController('Common.Controllers.ExternalOleEditor').getView('Common.Views.ExternalOleEditor');
|
||||
|
@ -2140,7 +2142,6 @@ define([
|
|||
|
||||
var canEditPoints = this.api && this.api.asc_canEditGeometry();
|
||||
documentHolder.menuImgEditPoints.setVisible(canEditPoints);
|
||||
documentHolder.menuImgEditPointsSeparator.setVisible(canEditPoints);
|
||||
canEditPoints && documentHolder.menuImgEditPoints.setDisabled(isObjLocked);
|
||||
|
||||
if (showMenu) this.showPopupMenu(documentHolder.imgMenu, {}, event);
|
||||
|
@ -4411,6 +4412,12 @@ define([
|
|||
}
|
||||
},
|
||||
|
||||
saveAsPicture: function() {
|
||||
if(this.api) {
|
||||
this.api.asc_SaveDrawingAsPicture();
|
||||
}
|
||||
},
|
||||
|
||||
getUserName: function(id){
|
||||
var usersStore = SSE.getCollection('Common.Collections.Users');
|
||||
if (usersStore){
|
||||
|
|
|
@ -851,12 +851,14 @@ define([
|
|||
caption: me.textMacro
|
||||
});
|
||||
|
||||
me.menuImgEditPoints = new Common.UI.MenuItem({
|
||||
caption: me.textEditPoints
|
||||
me.menuSaveAsPicture = new Common.UI.MenuItem({
|
||||
caption : me.textSaveAsPicture
|
||||
});
|
||||
|
||||
me.menuImgEditPointsSeparator = new Common.UI.MenuItem({
|
||||
caption : '--'
|
||||
var menuSaveAsPictureSeparator = new Common.UI.MenuItem({ caption: '--'});
|
||||
|
||||
me.menuImgEditPoints = new Common.UI.MenuItem({
|
||||
caption: me.textEditPoints
|
||||
});
|
||||
|
||||
this.imgMenu = new Common.UI.Menu({
|
||||
|
@ -870,17 +872,18 @@ define([
|
|||
me.menuSignatureEditSign,
|
||||
me.menuSignatureEditSetup,
|
||||
me.menuEditSignSeparator,
|
||||
me.menuImgEditPoints,
|
||||
me.menuImgEditPointsSeparator,
|
||||
me.menuImageArrange,
|
||||
me.menuImageAlign,
|
||||
me.menuImgRotate,
|
||||
me.menuImgMacro,
|
||||
menuSaveAsPictureSeparator,
|
||||
me.menuSaveAsPicture,
|
||||
me.mnuShapeSeparator,
|
||||
me.menuImgCrop,
|
||||
me.mnuChartData,
|
||||
me.mnuChartType,
|
||||
me.mnuChartEdit,
|
||||
me.menuImgEditPoints,
|
||||
me.mnuShapeAdvanced,
|
||||
me.menuImgOriginalSize,
|
||||
me.menuImgReplace,
|
||||
|
@ -1366,6 +1369,7 @@ define([
|
|||
textBullets: 'Bullets',
|
||||
textNumbering: 'Numbering',
|
||||
textMacro: 'Assign Macro',
|
||||
textSaveAsPicture: 'Save as picture',
|
||||
textEditPoints: 'Edit Points',
|
||||
tipNumCapitalLetters: 'A. B. C.',
|
||||
tipNumLettersParentheses: 'a) b) c)',
|
||||
|
|
|
@ -2178,6 +2178,7 @@
|
|||
"SSE.Views.DocumentHolder.textFromUrl": "From URL",
|
||||
"SSE.Views.DocumentHolder.textListSettings": "List Settings",
|
||||
"SSE.Views.DocumentHolder.textMacro": "Assign Macro",
|
||||
"SSE.Views.DocumentHolder.textSaveAsPicture": "Save as picture",
|
||||
"SSE.Views.DocumentHolder.textMax": "Max",
|
||||
"SSE.Views.DocumentHolder.textMin": "Min",
|
||||
"SSE.Views.DocumentHolder.textMore": "More functions",
|
||||
|
|
|
@ -2178,6 +2178,7 @@
|
|||
"SSE.Views.DocumentHolder.textFromUrl": "По URL",
|
||||
"SSE.Views.DocumentHolder.textListSettings": "Параметры списка",
|
||||
"SSE.Views.DocumentHolder.textMacro": "Назначить макрос",
|
||||
"SSE.Views.DocumentHolder.textSaveAsPicture": "Сохранить как рисунок",
|
||||
"SSE.Views.DocumentHolder.textMax": "Макс",
|
||||
"SSE.Views.DocumentHolder.textMin": "Мин",
|
||||
"SSE.Views.DocumentHolder.textMore": "Другие функции",
|
||||
|
|
Loading…
Reference in a new issue