[PE] Bug 58182

This commit is contained in:
Julia Radzhabova 2022-07-21 23:18:22 +03:00
parent bb5d6cf388
commit 5bc35f0941
3 changed files with 46 additions and 3 deletions

View file

@ -408,6 +408,7 @@ define([
view.menuImgEditPoints.on('click', _.bind(me.onImgEditPoints, me));
view.menuShapeAdvanced.on('click', _.bind(me.onShapeAdvanced, me));
view.menuParagraphAdvanced.on('click', _.bind(me.onParagraphAdvanced, me));
view.menuChartAdvanced.on('click', _.bind(me.onChartAdvanced, me));
view.mnuGroupImg.on('click', _.bind(me.onGroupImg, me));
view.mnuUnGroupImg.on('click', _.bind(me.onUnGroupImg, me));
view.mnuArrangeFront.on('click', _.bind(me.onArrangeFront, me));
@ -1930,6 +1931,39 @@ define([
}
},
onChartAdvanced: function(item, e){
var me = this;
if (me.api) {
var selectedElements = me.api.getSelectedElements();
if (selectedElements && selectedElements.length > 0){
var elType, elValue;
for (var i = selectedElements.length - 1; i >= 0; i--) {
elType = selectedElements[i].get_ObjectType();
elValue = selectedElements[i].get_ObjectValue();
if (Asc.c_oAscTypeSelectElement.Chart == elType) {
(new PE.Views.ChartSettingsAdvanced(
{
chartProps: elValue,
slideSize: PE.getController('Toolbar').currentPageSize,
handler: function(result, value) {
if (result == 'ok') {
if (me.api) {
me.api.ChartApply(value.chartProps);
}
}
me.editComplete();
Common.component.Analytics.trackEvent('DocumentHolder', 'Chart Settings Advanced');
}
})).show();
break;
}
}
}
}
},
onGroupImg: function(item) {
this.api && this.api.groupShapes();
this.editComplete();

View file

@ -1383,6 +1383,11 @@ define([
caption : me.advancedParagraphText
});
me.menuChartAdvanced = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-menu-chart',
caption : me.advancedChartText
});
var menuCommentParaSeparator = new Common.UI.MenuItem({
caption : '--'
});
@ -1542,7 +1547,6 @@ define([
});
me.menuChartEdit = new Common.UI.MenuItem({
iconCls: 'menu__icon btn-menu-chart',
caption : me.editChartText
});
@ -2155,7 +2159,8 @@ define([
me.menuImageAdvanced.setVisible(isimage);
me.menuShapeAdvanced.setVisible(_.isUndefined(value.imgProps) && _.isUndefined(value.chartProps));
me.menuChartEdit.setVisible(_.isUndefined(value.imgProps) && !_.isUndefined(value.chartProps) && (_.isUndefined(value.shapeProps) || value.shapeProps.isChart));
menuImgShapeSeparator.setVisible(me.menuImageAdvanced.isVisible() || me.menuShapeAdvanced.isVisible() || me.menuChartEdit.isVisible());
me.menuChartAdvanced.setVisible(_.isUndefined(value.imgProps) && !_.isUndefined(value.chartProps) && (_.isUndefined(value.shapeProps) || value.shapeProps.isChart));
menuImgShapeSeparator.setVisible(me.menuImageAdvanced.isVisible() || me.menuShapeAdvanced.isVisible() || me.menuChartEdit.isVisible() || me.menuChartAdvanced.isVisible());
/** coauthoring begin **/
me.menuAddCommentImg.setVisible(me.api.can_AddQuotedComment()!==false && me.mode.canCoAuthoring && me.mode.canComments);
menuCommentSeparatorImg.setVisible(me.menuAddCommentImg.isVisible());
@ -2170,6 +2175,7 @@ define([
}
me.menuImageAdvanced.setDisabled(disabled);
me.menuShapeAdvanced.setDisabled(disabled);
me.menuChartAdvanced.setDisabled(disabled);
if (me.menuChartEdit.isVisible())
me.menuChartEdit.setDisabled(disabled);
@ -2195,6 +2201,7 @@ define([
me.menuImageAdvanced,
me.menuShapeAdvanced
,me.menuChartEdit
,me.menuChartAdvanced
/** coauthoring begin **/
,menuCommentSeparatorImg,
me.menuAddCommentImg,
@ -2434,7 +2441,8 @@ define([
txtWarnUrl: 'Clicking this link can be harmful to your device and data.<br>Are you sure you want to continue?',
textEditPoints: 'Edit Points',
txtMoveSlidesToEnd: 'Move Slide to End',
txtMoveSlidesToStart: 'Move Slide to Beginning'
txtMoveSlidesToStart: 'Move Slide to Beginning',
advancedChartText : 'Chart Advanced Settings'
}, PE.Views.DocumentHolder || {}));
});

View file

@ -1401,6 +1401,7 @@
"PE.Views.DocumentHolder.advancedParagraphText": "Paragraph Advanced Settings",
"PE.Views.DocumentHolder.advancedShapeText": "Shape Advanced Settings",
"PE.Views.DocumentHolder.advancedTableText": "Table Advanced Settings",
"PE.Views.DocumentHolder.advancedChartText": "Chart Advanced Settings",
"PE.Views.DocumentHolder.alignmentText": "Alignment",
"PE.Views.DocumentHolder.belowText": "Below",
"PE.Views.DocumentHolder.cellAlignText": "Cell Vertical Alignment",