diff --git a/apps/presentationeditor/main/app/controller/DocumentHolder.js b/apps/presentationeditor/main/app/controller/DocumentHolder.js index e4988371d..0a66c5e07 100644 --- a/apps/presentationeditor/main/app/controller/DocumentHolder.js +++ b/apps/presentationeditor/main/app/controller/DocumentHolder.js @@ -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(); diff --git a/apps/presentationeditor/main/app/view/DocumentHolder.js b/apps/presentationeditor/main/app/view/DocumentHolder.js index ebb431b4a..1a58a3772 100644 --- a/apps/presentationeditor/main/app/view/DocumentHolder.js +++ b/apps/presentationeditor/main/app/view/DocumentHolder.js @@ -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.
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 || {})); }); \ No newline at end of file diff --git a/apps/presentationeditor/main/locale/en.json b/apps/presentationeditor/main/locale/en.json index f10ff9343..bd211bd25 100644 --- a/apps/presentationeditor/main/locale/en.json +++ b/apps/presentationeditor/main/locale/en.json @@ -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",