Commit f9534c18 authored by Julia Radzhabova's avatar Julia Radzhabova

[SSE] Fix Bug 34458.

parent 55aa6627
......@@ -47,6 +47,7 @@ define([
'spreadsheeteditor/main/app/view/DocumentHolder',
'spreadsheeteditor/main/app/view/HyperlinkSettingsDialog',
'spreadsheeteditor/main/app/view/ParagraphSettingsAdvanced',
'spreadsheeteditor/main/app/view/ImageSettingsAdvanced',
'spreadsheeteditor/main/app/view/SetValueDialog',
'spreadsheeteditor/main/app/view/AutoFilterDialog'
], function () {
......@@ -184,6 +185,7 @@ define([
view.pmiTextAdvanced.on('click', _.bind(me.onTextAdvanced, me));
view.mnuShapeAdvanced.on('click', _.bind(me.onShapeAdvanced, me));
view.mnuChartEdit.on('click', _.bind(me.onChartEdit, me));
view.mnuImgAdvanced.on('click', _.bind(me.onImgAdvanced, me));
var documentHolderEl = view.cmpEl;
......@@ -688,6 +690,25 @@ define([
})).show();
},
onImgAdvanced: function(item) {
var me = this;
(new SSE.Views.ImageSettingsAdvanced({
imageProps : item.imageInfo,
api : me.api,
handler : function(result, value) {
if (result == 'ok') {
if (me.api) {
me.api.asc_setGraphicObjectProps(value.imageProps);
Common.component.Analytics.trackEvent('DocumentHolder', 'Apply advanced image settings');
}
}
Common.NotificationCenter.trigger('edit:complete', me);
}
})).show();
},
onChartEdit: function(item) {
var me = this;
var win, props;
......@@ -1213,9 +1234,10 @@ define([
documentHolder.mnuChartEdit.chartInfo = elValue;
ischartmenu = true;
has_chartprops = true;
}
else
} else {
documentHolder.mnuImgAdvanced.imageInfo = elValue;
isimagemenu = true;
}
}
}
......@@ -1227,8 +1249,10 @@ define([
documentHolder.mnuChartEdit.setDisabled(isObjLocked);
documentHolder.pmiImgCut.setDisabled(isObjLocked);
documentHolder.pmiImgPaste.setDisabled(isObjLocked);
documentHolder.mnuImgAdvanced.setVisible(isimagemenu && !isshapemenu && !ischartmenu);
documentHolder.mnuImgAdvanced.setDisabled(isObjLocked);
if (showMenu) this.showPopupMenu(documentHolder.imgMenu, {}, event);
documentHolder.mnuShapeSeparator.setVisible(documentHolder.mnuShapeAdvanced.isVisible() || documentHolder.mnuChartEdit.isVisible());
documentHolder.mnuShapeSeparator.setVisible(documentHolder.mnuShapeAdvanced.isVisible() || documentHolder.mnuChartEdit.isVisible() || documentHolder.mnuImgAdvanced.isVisible());
} else if (istextshapemenu || istextchartmenu) {
if (!showMenu && !documentHolder.textInShapeMenu.isVisible()) return;
......
......@@ -418,6 +418,10 @@ define([
caption : me.advancedShapeText
});
me.mnuImgAdvanced = new Common.UI.MenuItem({
caption : me.advancedImgText
});
me.mnuChartEdit = new Common.UI.MenuItem({
caption : me.chartText
});
......@@ -469,7 +473,8 @@ define([
me.mnuUnGroupImg,
me.mnuShapeSeparator,
me.mnuChartEdit,
me.mnuShapeAdvanced
me.mnuShapeAdvanced,
me.mnuImgAdvanced
]
});
......@@ -706,7 +711,8 @@ define([
txtSparklines: 'Sparklines',
txtClearSparklines: 'Clear Selected Sparklines',
txtClearSparklineGroups: 'Clear Selected Sparkline Groups',
txtShowComment: 'Show Comment'
txtShowComment: 'Show Comment',
advancedImgText: 'Image Advanced Settings'
}, SSE.Views.DocumentHolder || {}));
});
\ No newline at end of file
......@@ -934,6 +934,7 @@
"SSE.Views.DigitalFilterDialog.textUse2": "Use * to present any series of character",
"SSE.Views.DigitalFilterDialog.txtTitle": "Custom Filter",
"SSE.Views.DocumentHolder.advancedShapeText": "Shape Advanced Settings",
"SSE.Views.DocumentHolder.advancedImgText": "Image Advanced Settings",
"SSE.Views.DocumentHolder.bottomCellText": "Align Bottom",
"SSE.Views.DocumentHolder.centerCellText": "Align Center",
"SSE.Views.DocumentHolder.chartText": "Chart Advanced Settings",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment