Merge branch 'develop' into feature/equation-toolbar
This commit is contained in:
commit
cd9f85f2a4
|
@ -422,6 +422,8 @@ define([
|
|||
view.menuTableTOC.menu.on('item:click', _.bind(me.onTOCMenu, me));
|
||||
view.menuParaTOCRefresh.menu.on('item:click', _.bind(me.onTOCMenu, me));
|
||||
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));
|
||||
},
|
||||
|
||||
getView: function (name) {
|
||||
|
@ -2383,6 +2385,17 @@ define([
|
|||
}
|
||||
},
|
||||
|
||||
convertEquation: function(menu, item, e) {
|
||||
if (this.api) {
|
||||
if (item.options.type=='input')
|
||||
this.api.asc_SetMathInputType(item.value);
|
||||
else if (item.options.type=='view')
|
||||
this.api.asc_ConvertMathView(item.value.linear, item.value.all);
|
||||
else if (item.options.type=='mode')
|
||||
this.api.asc_ConvertMathDisplayMode(item.checked);
|
||||
}
|
||||
},
|
||||
|
||||
editComplete: function() {
|
||||
this.documentHolder && this.documentHolder.fireEvent('editcomplete', this.documentHolder);
|
||||
}
|
||||
|
|
|
@ -1143,6 +1143,68 @@ define([
|
|||
caption : '--'
|
||||
});
|
||||
|
||||
me.menuTableEquation = new Common.UI.MenuItem({
|
||||
caption : me.advancedEquationText,
|
||||
menu : new Common.UI.Menu({
|
||||
cls: 'ppm-toolbar shifted-right',
|
||||
menuAlign: 'tl-tr',
|
||||
items : [
|
||||
new Common.UI.MenuItem({
|
||||
caption : me.unicodeText,
|
||||
iconCls : 'menu__icon unicode',
|
||||
checkable : true,
|
||||
checkmark : false,
|
||||
checked : false,
|
||||
toggleGroup : 'popupparaeqinput',
|
||||
type : 'input',
|
||||
value : Asc.c_oAscMathInputType.Unicode
|
||||
}),
|
||||
new Common.UI.MenuItem({
|
||||
caption : me.latexText,
|
||||
iconCls : 'menu__icon latex',
|
||||
checkable : true,
|
||||
checkmark : false,
|
||||
checked : false,
|
||||
toggleGroup : 'popupparaeqinput',
|
||||
type : 'input',
|
||||
value : Asc.c_oAscMathInputType.LaTeX
|
||||
}),
|
||||
{ caption : '--' },
|
||||
new Common.UI.MenuItem({
|
||||
caption : me.currProfText,
|
||||
iconCls : 'menu__icon professional-equation',
|
||||
type : 'view',
|
||||
value : {all: false, linear: false}
|
||||
}),
|
||||
new Common.UI.MenuItem({
|
||||
caption : me.currLinearText,
|
||||
iconCls : 'menu__icon linear-equation',
|
||||
type : 'view',
|
||||
value : {all: false, linear: true}
|
||||
}),
|
||||
new Common.UI.MenuItem({
|
||||
caption : me.allProfText,
|
||||
iconCls : 'menu__icon professional-equation',
|
||||
type : 'view',
|
||||
value : {all: true, linear: false}
|
||||
}),
|
||||
new Common.UI.MenuItem({
|
||||
caption : me.allLinearText,
|
||||
iconCls : 'menu__icon linear-equation',
|
||||
type : 'view',
|
||||
value : {all: true, linear: true}
|
||||
}),
|
||||
{ caption : '--' },
|
||||
new Common.UI.MenuItem({
|
||||
caption : me.eqToInlineText,
|
||||
checkable : true,
|
||||
checked : false,
|
||||
type : 'mode'
|
||||
})
|
||||
]
|
||||
})
|
||||
});
|
||||
|
||||
me.menuTableSelectText = new Common.UI.MenuItem({
|
||||
caption : me.selectText,
|
||||
menu : new Common.UI.Menu({
|
||||
|
@ -1388,6 +1450,15 @@ define([
|
|||
me.clearEquationMenu(false, 10);
|
||||
menuEquationSeparatorInTable.setVisible(isEquation && eqlen>0);
|
||||
|
||||
me.menuTableEquation.setVisible(isEquation);
|
||||
me.menuTableEquation.setDisabled(disabled);
|
||||
if (isEquation) {
|
||||
var eq = me.api.asc_GetMathInputType();
|
||||
me.menuTableEquation.menu.items[0].setChecked(eq===Asc.c_oAscMathInputType.Unicode);
|
||||
me.menuTableEquation.menu.items[1].setChecked(eq===Asc.c_oAscMathInputType.LaTeX);
|
||||
me.menuTableEquation.menu.items[8].setChecked(me.api.asc_IsInlineMath());
|
||||
}
|
||||
|
||||
var control_lock = (value.paraProps) ? (!value.paraProps.value.can_DeleteBlockContentControl() || !value.paraProps.value.can_EditBlockContentControl() ||
|
||||
!value.paraProps.value.can_DeleteInlineContentControl() || !value.paraProps.value.can_EditInlineContentControl()) : false;
|
||||
var in_toc = me.api.asc_GetTableOfContentsPr(true),
|
||||
|
@ -1470,7 +1541,8 @@ define([
|
|||
me.menuTableRemoveForm,
|
||||
menuTableControl,
|
||||
me.menuTableTOC,
|
||||
me.menuParagraphAdvancedInTable
|
||||
me.menuParagraphAdvancedInTable,
|
||||
me.menuTableEquation
|
||||
]
|
||||
}).on('hide:after', function(menu, e, isFromInputControl) {
|
||||
if (me.suppressEditComplete) {
|
||||
|
@ -1584,6 +1656,68 @@ define([
|
|||
caption : me.advancedDropCapText
|
||||
});
|
||||
|
||||
me.menuParagraphEquation = new Common.UI.MenuItem({
|
||||
caption : me.advancedEquationText,
|
||||
menu : new Common.UI.Menu({
|
||||
cls: 'ppm-toolbar shifted-right',
|
||||
menuAlign: 'tl-tr',
|
||||
items : [
|
||||
new Common.UI.MenuItem({
|
||||
caption : me.unicodeText,
|
||||
iconCls : 'menu__icon unicode',
|
||||
checkable : true,
|
||||
checkmark : false,
|
||||
checked : false,
|
||||
toggleGroup : 'popupparaeqinput',
|
||||
type : 'input',
|
||||
value : Asc.c_oAscMathInputType.Unicode
|
||||
}),
|
||||
new Common.UI.MenuItem({
|
||||
caption : me.latexText,
|
||||
iconCls : 'menu__icon latex',
|
||||
checkable : true,
|
||||
checkmark : false,
|
||||
checked : false,
|
||||
toggleGroup : 'popupparaeqinput',
|
||||
type : 'input',
|
||||
value : Asc.c_oAscMathInputType.LaTeX
|
||||
}),
|
||||
{ caption : '--' },
|
||||
new Common.UI.MenuItem({
|
||||
caption : me.currProfText,
|
||||
iconCls : 'menu__icon professional-equation',
|
||||
type : 'view',
|
||||
value : {all: false, linear: false}
|
||||
}),
|
||||
new Common.UI.MenuItem({
|
||||
caption : me.currLinearText,
|
||||
iconCls : 'menu__icon linear-equation',
|
||||
type : 'view',
|
||||
value : {all: false, linear: true}
|
||||
}),
|
||||
new Common.UI.MenuItem({
|
||||
caption : me.allProfText,
|
||||
iconCls : 'menu__icon professional-equation',
|
||||
type : 'view',
|
||||
value : {all: true, linear: false}
|
||||
}),
|
||||
new Common.UI.MenuItem({
|
||||
caption : me.allLinearText,
|
||||
iconCls : 'menu__icon linear-equation',
|
||||
type : 'view',
|
||||
value : {all: true, linear: true}
|
||||
}),
|
||||
{ caption : '--' },
|
||||
new Common.UI.MenuItem({
|
||||
caption : me.eqToInlineText,
|
||||
checkable : true,
|
||||
checked : false,
|
||||
type : 'mode'
|
||||
})
|
||||
]
|
||||
})
|
||||
});
|
||||
|
||||
/** coauthoring begin **/
|
||||
var menuCommentSeparatorPara = new Common.UI.MenuItem({
|
||||
caption : '--'
|
||||
|
@ -1954,6 +2088,15 @@ define([
|
|||
me.menuEquationInsertCaption.setVisible(isEquation);
|
||||
menuEquationInsertCaptionSeparator.setVisible(isEquation);
|
||||
|
||||
me.menuParagraphEquation.setVisible(isEquation);
|
||||
me.menuParagraphEquation.setDisabled(disabled);
|
||||
if (isEquation) {
|
||||
var eq = me.api.asc_GetMathInputType();
|
||||
me.menuParagraphEquation.menu.items[0].setChecked(eq===Asc.c_oAscMathInputType.Unicode);
|
||||
me.menuParagraphEquation.menu.items[1].setChecked(eq===Asc.c_oAscMathInputType.LaTeX);
|
||||
me.menuParagraphEquation.menu.items[8].setChecked(me.api.asc_IsInlineMath());
|
||||
}
|
||||
|
||||
var frame_pr = value.paraProps.value.get_FramePr();
|
||||
me.menuFrameAdvanced.setVisible(frame_pr !== undefined);
|
||||
me.menuDropCapAdvanced.setVisible(frame_pr !== undefined);
|
||||
|
@ -2057,6 +2200,7 @@ define([
|
|||
me.menuParagraphAdvanced,
|
||||
me.menuFrameAdvanced,
|
||||
me.menuDropCapAdvanced,
|
||||
me.menuParagraphEquation,
|
||||
/** coauthoring begin **/
|
||||
menuCommentSeparatorPara,
|
||||
me.menuAddCommentPara,
|
||||
|
@ -3077,7 +3221,15 @@ define([
|
|||
txtWarnUrl: 'Clicking this link can be harmful to your device and data.<br>Are you sure you want to continue?',
|
||||
textEditPoints: 'Edit Points',
|
||||
textAccept: 'Accept Change',
|
||||
textReject: 'Reject Change'
|
||||
textReject: 'Reject Change',
|
||||
advancedEquationText: 'Equation Settings',
|
||||
unicodeText: 'Unicode',
|
||||
latexText: 'LaTeX',
|
||||
currProfText: 'Current - Professional',
|
||||
currLinearText: 'Current - Linear',
|
||||
allProfText: 'All - Professional',
|
||||
allLinearText: 'All - Linear',
|
||||
eqToInlineText: 'Change to Inline'
|
||||
|
||||
}, DE.Views.DocumentHolder || {}));
|
||||
});
|
|
@ -1657,6 +1657,14 @@
|
|||
"DE.Views.DocumentHolder.txtWarnUrl": "Clicking this link can be harmful to your device and data.<br>Are you sure you want to continue?",
|
||||
"DE.Views.DocumentHolder.updateStyleText": "Update %1 style",
|
||||
"DE.Views.DocumentHolder.vertAlignText": "Vertical Alignment",
|
||||
"DE.Views.DocumentHolder.advancedEquationText": "Equation Settings",
|
||||
"DE.Views.DocumentHolder.unicodeText": "Unicode",
|
||||
"DE.Views.DocumentHolder.latexText": "LaTeX",
|
||||
"DE.Views.DocumentHolder.currProfText": "Current - Professional",
|
||||
"DE.Views.DocumentHolder.currLinearText": "Current - Linear",
|
||||
"DE.Views.DocumentHolder.allProfText": "All - Professional",
|
||||
"DE.Views.DocumentHolder.allLinearText": "All - Linear",
|
||||
"DE.Views.DocumentHolder.eqToInlineText": "Change to Inline",
|
||||
"DE.Views.DropcapSettingsAdvanced.strBorders": "Borders & Fill",
|
||||
"DE.Views.DropcapSettingsAdvanced.strDropcap": "Drop Cap",
|
||||
"DE.Views.DropcapSettingsAdvanced.strMargins": "Margins",
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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 || {}));
|
||||
});
|
|
@ -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",
|
||||
|
|
Loading…
Reference in a new issue