diff --git a/apps/documenteditor/main/app/controller/Toolbar.js b/apps/documenteditor/main/app/controller/Toolbar.js
index a38741c38..8ed872111 100644
--- a/apps/documenteditor/main/app/controller/Toolbar.js
+++ b/apps/documenteditor/main/app/controller/Toolbar.js
@@ -2198,7 +2198,7 @@ define([
},
fillEquations: function() {
- if (!this.toolbar.btnInsertEquation.rendered) return;
+ if (!this.toolbar.btnInsertEquation.rendered || this.toolbar.btnInsertEquation.menu.items.length>0) return;
var me = this, equationsStore = this.getApplication().getCollection('EquationGroups');
diff --git a/apps/presentationeditor/main/app/collection/EquationGroups.js b/apps/presentationeditor/main/app/collection/EquationGroups.js
new file mode 100644
index 000000000..85f7a1842
--- /dev/null
+++ b/apps/presentationeditor/main/app/collection/EquationGroups.js
@@ -0,0 +1,53 @@
+/*
+ *
+ * (c) Copyright Ascensio System Limited 2010-2016
+ *
+ * This program is a free software product. You can redistribute it and/or
+ * modify it under the terms of the GNU Affero General Public License (AGPL)
+ * version 3 as published by the Free Software Foundation. In accordance with
+ * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
+ * that Ascensio System SIA expressly excludes the warranty of non-infringement
+ * of any third-party rights.
+ *
+ * This program is distributed WITHOUT ANY WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
+ * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
+ *
+ * You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
+ * EU, LV-1021.
+ *
+ * The interactive user interfaces in modified source and object code versions
+ * of the Program must display Appropriate Legal Notices, as required under
+ * Section 5 of the GNU AGPL version 3.
+ *
+ * Pursuant to Section 7(b) of the License you must retain the original Product
+ * logo when distributing the program. Pursuant to Section 7(e) we decline to
+ * grant you any rights under trademark law for use of our trademarks.
+ *
+ * All the Product's GUI elements, including illustrations and icon sets, as
+ * well as technical writing content are licensed under the terms of the
+ * Creative Commons Attribution-ShareAlike 4.0 International. See the License
+ * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
+ *
+*/
+/**
+ * EquationGroups.js
+ *
+ * Created by Alexey Musinov on 29/10/14
+ * Copyright (c) 2014 Ascensio System SIA. All rights reserved.
+ *
+ */
+
+define([
+ 'backbone',
+ 'presentationeditor/main/app/model/EquationGroup'
+], function(Backbone){ 'use strict';
+ if (Common === undefined)
+ var Common = {};
+
+ Common.Collections = Common.Collections || {};
+
+ PE.Collections.EquationGroups = Backbone.Collection.extend({
+ model: PE.Models.EquationGroup
+ });
+});
diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js
index d07eb6e80..bdc4e7bd8 100644
--- a/apps/presentationeditor/main/app/controller/Main.js
+++ b/apps/presentationeditor/main/app/controller/Main.js
@@ -50,7 +50,8 @@ define([
'common/main/lib/collection/TextArt',
'common/main/lib/view/OpenDialog',
'presentationeditor/main/app/collection/ShapeGroups',
- 'presentationeditor/main/app/collection/SlideLayouts'
+ 'presentationeditor/main/app/collection/SlideLayouts',
+ 'presentationeditor/main/app/collection/EquationGroups'
], function () { 'use strict';
PE.Controllers.Main = Backbone.Controller.extend(_.extend((function() {
@@ -72,6 +73,7 @@ define([
collections: [
'ShapeGroups',
'SlideLayouts',
+ 'EquationGroups',
'Common.Collections.TextArt'
],
views: [],
diff --git a/apps/presentationeditor/main/app/controller/Toolbar.js b/apps/presentationeditor/main/app/controller/Toolbar.js
index bb2a14ba5..1fdb231a1 100644
--- a/apps/presentationeditor/main/app/controller/Toolbar.js
+++ b/apps/presentationeditor/main/app/controller/Toolbar.js
@@ -47,6 +47,7 @@ define([
'common/main/lib/view/CopyWarningDialog',
'common/main/lib/view/ImageFromUrlDialog',
'common/main/lib/view/InsertTableDialog',
+ 'common/main/lib/util/define',
'presentationeditor/main/app/view/Toolbar',
'presentationeditor/main/app/view/HyperlinkSettingsDialog',
'presentationeditor/main/app/view/SlideSizeSettings',
@@ -93,7 +94,8 @@ define([
can_hyper: undefined,
zoom_type: undefined,
zoom_percent: undefined,
- fontsize: undefined
+ fontsize: undefined,
+ in_equation: undefined
};
this._isAddingShape = false;
this.slideSizeArr = [
@@ -246,6 +248,7 @@ define([
toolbar.btnFitWidth.on('toggle', _.bind(this.onZoomToWidthToggle, this));
toolbar.mnuZoomIn.on('click', _.bind(this.onZoomInClick, this));
toolbar.mnuZoomOut.on('click', _.bind(this.onZoomOutClick, this));
+ toolbar.btnInsertEquation.on('click', _.bind(this.onInsertEquationClick, this));
},
setApi: function(api) {
@@ -289,6 +292,7 @@ define([
this.api.asc_registerCallback('asc_onInitEditorStyles', _.bind(this.onApiInitEditorStyles, this));
this.api.asc_registerCallback('asc_onCountPages', _.bind(this.onApiCountPages, this));
+ this.api.asc_registerCallback('asc_onMathTypes', _.bind(this.onMathTypes, this));
this.onSetupCopyStyleButton();
},
@@ -565,7 +569,8 @@ define([
slide_layout_lock = undefined,
no_paragraph = true,
no_text = true,
- no_object = true;
+ no_object = true,
+ in_equation = false;
while (++i < selectedObjects.length) {
type = selectedObjects[i].get_ObjectType();
@@ -584,6 +589,8 @@ define([
if (type !== Asc.c_oAscTypeSelectElement.Image) {
no_text = false;
}
+ } else if (type === Asc.c_oAscTypeSelectElement.Math) {
+ in_equation = true;
}
}
@@ -622,6 +629,11 @@ define([
if (this._state.activated) this._state.slidecontrolsdisable = slide_deleted;
this.toolbar.lockToolbar(PE.enumLock.slideDeleted, slide_deleted, {array: me.toolbar.slideOnlyControls.concat(me.toolbar.paragraphControls)});
}
+
+ if (this._state.in_equation !== in_equation) {
+ if (this._state.activated) this._state.in_equation = in_equation;
+ this.toolbar.lockToolbar(PE.enumLock.inEquation, in_equation, {array: [me.toolbar.btnSuperscript, me.toolbar.btnSubscript]});
+ }
},
onApiStyleChange: function(v) {
@@ -1693,6 +1705,200 @@ define([
}
},
+ fillEquations: function() {
+ if (!this.toolbar.btnInsertEquation.rendered || this.toolbar.btnInsertEquation.menu.items.length>0) return;
+
+ var me = this, equationsStore = this.getApplication().getCollection('EquationGroups');
+
+ me.equationPickers = [];
+ me.toolbar.btnInsertEquation.menu.removeAll();
+
+ for (var i = 0; i < equationsStore.length; ++i) {
+ var equationGroup = equationsStore.at(i);
+
+ var menuItem = new Common.UI.MenuItem({
+ caption: equationGroup.get('groupName'),
+ menu: new Common.UI.Menu({
+ menuAlign: 'tl-tr',
+ items: [
+ { template: _.template('
') }
+ ]
+ })
+ });
+
+ me.toolbar.btnInsertEquation.menu.addItem(menuItem);
+
+ var equationPicker = new Common.UI.DataView({
+ el: $('#id-toolbar-menu-equationgroup' + i),
+ store: equationGroup.get('groupStore'),
+ parentMenu: menuItem.menu,
+ showLast: false,
+ itemTemplate: _.template('px <%= posY %>px;" >' +
+ '
')
+ });
+ if (equationGroup.get('groupHeight').length) {
+
+ me.equationPickers.push(equationPicker);
+ me.toolbar.btnInsertEquation.menu.on('show:after', function () {
+
+ if (me.equationPickers.length) {
+ var element = $(this.el).find('.over').find('.menu-shape');
+ if (element.length) {
+ for (var i = 0; i < me.equationPickers.length; ++i) {
+ if (element[0].id == me.equationPickers[i].el.id) {
+ me.equationPickers[i].scroller.update({alwaysVisibleY: true});
+ me.equationPickers.splice(i, 1);
+ return;
+ }
+ }
+ }
+ }
+ });
+ }
+
+ equationPicker.on('item:click', function(picker, item, record, e) {
+ if (me.api) {
+ me.api.asc_AddMath(record.get('data').equationType);
+
+ if (me.toolbar.btnInsertText.pressed) {
+ me.toolbar.btnInsertText.toggle(false, true);
+ }
+ if (me.toolbar.btnInsertShape.pressed) {
+ me.toolbar.btnInsertShape.toggle(false, true);
+ }
+
+ if (e.type !== 'click')
+ me.toolbar.btnInsertEquation.menu.hide();
+ Common.NotificationCenter.trigger('edit:complete', me.toolbar, me.toolbar.btnInsertEquation);
+ Common.component.Analytics.trackEvent('ToolBar', 'Add Equation');
+ }
+ });
+ }
+ },
+
+ onInsertEquationClick: function() {
+ if (this.api) {
+ this.api.asc_AddMath();
+ Common.component.Analytics.trackEvent('ToolBar', 'Add Equation');
+ }
+ Common.NotificationCenter.trigger('edit:complete', this.toolbar, this.toolbar.btnInsertEquation);
+ },
+
+ onMathTypes: function(equation) {
+ var equationgrouparray = [],
+ equationsStore = this.getCollection('EquationGroups');
+
+ equationsStore.reset();
+
+ // equations groups
+
+ var c_oAscMathMainTypeStrings = {};
+
+ // [translate, count cells, scroll]
+
+ c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Symbol ] = [this.textSymbols, 11];
+ c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Fraction ] = [this.textFraction, 4];
+ c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Script ] = [this.textScript, 4];
+ c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Radical ] = [this.textRadical, 4];
+ c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Integral ] = [this.textIntegral, 3, true];
+ c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.LargeOperator] = [this.textLargeOperator, 5, true];
+ c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Bracket ] = [this.textBracket, 4, true];
+ c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Function ] = [this.textFunction, 3, true];
+ c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Accent ] = [this.textAccent, 4];
+ c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.LimitLog ] = [this.textLimitAndLog, 3];
+ c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Operator ] = [this.textOperator, 4];
+ c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Matrix ] = [this.textMatrix, 4, true];
+
+ // equations sub groups
+
+ // equations types
+
+ var translationTable = {}, name = '', translate = '';
+ for (name in Common.define.c_oAscMathType) {
+ if (Common.define.c_oAscMathType.hasOwnProperty(name)) {
+ var arr = name.split('_');
+ if (arr.length==2 && arr[0]=='Symbol') {
+ translate = 'txt' + arr[0] + '_' + arr[1].toLocaleLowerCase();
+ } else
+ translate = 'txt' + name;
+ translationTable[Common.define.c_oAscMathType[name]] = this[translate];
+ }
+ }
+
+ var i,id = 0, count = 0, length = 0, width = 0, height = 0, store = null, list = null, eqStore = null, eq = null;
+
+ if (equation) {
+
+ count = equation.get_Data().length;
+
+ if (count) {
+ for (var j = 0; j < count; ++j) {
+ id = equation.get_Data()[j].get_Id();
+ width = equation.get_Data()[j].get_W();
+ height = equation.get_Data()[j].get_H();
+
+ store = new Backbone.Collection([], {
+ model: PE.Models.EquationModel
+ });
+
+ if (store) {
+
+ var allItemsCount = 0, itemsCount = 0, ids = 0;
+
+ length = equation.get_Data()[j].get_Data().length;
+
+ for (i = 0; i < length; ++i) {
+ eqStore = equation.get_Data()[j].get_Data()[i];
+
+ itemsCount = eqStore.get_Data().length;
+ for (var p = 0; p < itemsCount; ++p) {
+
+ eq = eqStore.get_Data()[p];
+ ids = eq.get_Id();
+
+ translate = '';
+
+ if (translationTable.hasOwnProperty(ids)) {
+ translate = translationTable[ids];
+ }
+
+ store.add({
+ data : {equationType: ids},
+ tip : translate,
+ allowSelected : true,
+ selected : false,
+ width : eqStore.get_W(),
+ height : eqStore.get_H(),
+ posX : -eq.get_X(),
+ posY : -eq.get_Y()
+ });
+ }
+
+ allItemsCount += itemsCount;
+ }
+
+ width = c_oAscMathMainTypeStrings[id][1] * (width + 10); // 4px margin + 4px margin + 1px border + 1px border
+
+ var normHeight = parseInt(370 / (height + 10)) * (height + 10);
+ equationgrouparray.push({
+ groupName : c_oAscMathMainTypeStrings[id][0],
+ groupStore : store,
+ groupWidth : width,
+ groupHeight : c_oAscMathMainTypeStrings[id][2] ? ' height:'+ normHeight +'px!important; ' : ''
+ });
+ }
+ }
+
+ equationsStore.add(equationgrouparray);
+
+ this.fillEquations();
+ }
+ }
+ },
+
updateThemeColors: function() {
if (Common.Utils.ThemeColor.getEffectColors()===undefined) return;
@@ -1838,6 +2044,348 @@ define([
textEmptyImgUrl : 'You need to specify image URL.',
textWarning : 'Warning',
textFontSizeErr : 'The entered value must be more than 0',
- confirmAddFontName: 'The font you are going to save is not available on the current device.
The text style will be displayed using one of the device fonts, the saved font will be used when it is available.
Do you want to continue?'
+ confirmAddFontName: 'The font you are going to save is not available on the current device.
The text style will be displayed using one of the device fonts, the saved font will be used when it is available.
Do you want to continue?',
+ textSymbols : 'Symbols',
+ textFraction : 'Fraction',
+ textScript : 'Script',
+ textRadical : 'Radical',
+ textIntegral : 'Integral',
+ textLargeOperator : 'Large Operator',
+ textBracket : 'Bracket',
+ textFunction : 'Function',
+ textAccent : 'Accent',
+ textLimitAndLog : 'Limit And Log',
+ textOperator : 'Operator',
+ textMatrix : 'Matrix',
+
+ txtSymbol_pm : 'Plus Minus',
+ txtSymbol_infinity : 'Infinity',
+ txtSymbol_equals : 'Equal',
+ txtSymbol_neq : 'Not Equal To',
+ txtSymbol_about : 'Approximately',
+ txtSymbol_times : 'Multiplication Sign',
+ txtSymbol_div : 'Division Sign',
+ txtSymbol_factorial : 'Factorial',
+ txtSymbol_propto : 'Proportional To',
+ txtSymbol_less : 'Less Than',
+ txtSymbol_ll : 'Much Less Than',
+ txtSymbol_greater : 'Greater Than',
+ txtSymbol_gg : 'Much Greater Than',
+ txtSymbol_leq : 'Less Than or Equal To',
+ txtSymbol_geq : 'Greater Than or Equal To',
+ txtSymbol_mp : 'Minus Plus',
+ txtSymbol_cong : 'Approximately Equal To',
+ txtSymbol_approx : 'Almost Equal To',
+ txtSymbol_equiv : 'Identical To',
+ txtSymbol_forall : 'For All',
+ txtSymbol_additional : 'Complement',
+ txtSymbol_partial : 'Partial Differential',
+ txtSymbol_sqrt : 'Radical Sign',
+ txtSymbol_cbrt : 'Cube Root',
+ txtSymbol_qdrt : 'Fourth Root',
+ txtSymbol_cup : 'Union',
+ txtSymbol_cap : 'Intersection',
+ txtSymbol_emptyset : 'Empty Set',
+ txtSymbol_percent : 'Percentage',
+ txtSymbol_degree : 'Degrees',
+ txtSymbol_fahrenheit : 'Degrees Fahrenheit',
+ txtSymbol_celsius : 'Degrees Celsius',
+ txtSymbol_inc : 'Increment',
+ txtSymbol_nabla : 'Nabla',
+ txtSymbol_exists : 'There Exist',
+ txtSymbol_notexists : 'There Does Not Exist',
+ txtSymbol_in : 'Element Of',
+ txtSymbol_ni : 'Contains as Member',
+ txtSymbol_leftarrow : 'Left Arrow',
+ txtSymbol_uparrow : 'Up Arrow',
+ txtSymbol_rightarrow : 'Right Arrow',
+ txtSymbol_downarrow : 'Down Arrow',
+ txtSymbol_leftrightarrow : 'Left-Right Arrow',
+ txtSymbol_therefore : 'Therefore',
+ txtSymbol_plus : 'Plus',
+ txtSymbol_minus : 'Minus',
+ txtSymbol_not : 'Not Sign',
+ txtSymbol_ast : 'Asterisk Operator',
+ txtSymbol_bullet : 'Bulet Operator',
+ txtSymbol_vdots : 'Vertical Ellipsis',
+ txtSymbol_cdots : 'Midline Horizontal Ellipsis',
+ txtSymbol_rddots : 'Up Right Diagonal Ellipsis',
+ txtSymbol_ddots : 'Down Right Diagonal Ellipsis',
+ txtSymbol_aleph : 'Alef',
+ txtSymbol_beth : 'Bet',
+ txtSymbol_qed : 'End of Proof',
+ txtSymbol_alpha : 'Alpha',
+ txtSymbol_beta : 'Beta',
+ txtSymbol_gamma : 'Gamma',
+ txtSymbol_delta : 'Delta',
+ txtSymbol_varepsilon : 'Epsilon Variant',
+ txtSymbol_epsilon : 'Epsilon',
+ txtSymbol_zeta : 'Zeta',
+ txtSymbol_eta : 'Eta',
+ txtSymbol_theta : 'Theta',
+ txtSymbol_vartheta : 'Theta Variant',
+ txtSymbol_iota : 'Iota',
+ txtSymbol_kappa : 'Kappa',
+ txtSymbol_lambda : 'Lambda',
+ txtSymbol_mu : 'Mu',
+ txtSymbol_nu : 'Nu',
+ txtSymbol_xsi : 'Xi',
+ txtSymbol_o : 'Omicron',
+ txtSymbol_pi : 'Pi',
+ txtSymbol_varpi : 'Pi Variant',
+ txtSymbol_rho : 'Rho',
+ txtSymbol_varrho : 'Rho Variant',
+ txtSymbol_sigma : 'Sigma',
+ txtSymbol_varsigma : 'Sigma Variant',
+ txtSymbol_tau : 'Tau',
+ txtSymbol_upsilon : 'Upsilon',
+ txtSymbol_varphi : 'Phi Variant',
+ txtSymbol_phi : 'Phi',
+ txtSymbol_chi : 'Chi',
+ txtSymbol_psi : 'Psi',
+ txtSymbol_omega : 'Omega',
+
+ txtFractionVertical : 'Stacked Fraction',
+ txtFractionDiagonal : 'Skewed Fraction',
+ txtFractionHorizontal : 'Linear Fraction',
+ txtFractionSmall : 'Small Fraction',
+ txtFractionDifferential_1 : 'Differential',
+ txtFractionDifferential_2 : 'Differential',
+ txtFractionDifferential_3 : 'Differential',
+ txtFractionDifferential_4 : 'Differential',
+ txtFractionPi_2 : 'Pi Over 2',
+
+ txtScriptSup : 'Superscript',
+ txtScriptSub : 'Subscript',
+ txtScriptSubSup : 'Subscript-Superscript',
+ txtScriptSubSupLeft : 'Left Subscript-Superscript',
+ txtScriptCustom_1 : 'Script',
+ txtScriptCustom_2 : 'Script',
+ txtScriptCustom_3 : 'Script',
+ txtScriptCustom_4 : 'Script',
+
+ txtRadicalSqrt : 'Square Root',
+ txtRadicalRoot_n : 'Radical With Degree',
+ txtRadicalRoot_2 : 'Square Root With Degree',
+ txtRadicalRoot_3 : 'Cubic Root',
+ txtRadicalCustom_1 : 'Radical',
+ txtRadicalCustom_2 : 'Radical',
+
+ txtIntegral : 'Integral',
+ txtIntegralSubSup : 'Integral',
+ txtIntegralCenterSubSup : 'Integral',
+ txtIntegralDouble : 'Double Integral',
+ txtIntegralDoubleSubSup : 'Double Integral',
+ txtIntegralDoubleCenterSubSup : 'Double Integral',
+ txtIntegralTriple : 'Triple Integral',
+ txtIntegralTripleSubSup : 'Triple Integral',
+ txtIntegralTripleCenterSubSup : 'Triple Integral',
+ txtIntegralOriented : 'Contour Integral',
+ txtIntegralOrientedSubSup : 'Contour Integral',
+ txtIntegralOrientedCenterSubSup : 'Contour Integral',
+ txtIntegralOrientedDouble : 'Surface Integral',
+ txtIntegralOrientedDoubleSubSup : 'Surface Integral',
+ txtIntegralOrientedDoubleCenterSubSup : 'Surface Integral',
+ txtIntegralOrientedTriple : 'Volume Integral',
+ txtIntegralOrientedTripleSubSup : 'Volume Integral',
+ txtIntegralOrientedTripleCenterSubSup : 'Volume Integral',
+ txtIntegral_dx : 'Differential x',
+ txtIntegral_dy : 'Differential y',
+ txtIntegral_dtheta : 'Differential theta',
+
+ txtLargeOperator_Sum : 'Summation',
+ txtLargeOperator_Sum_CenterSubSup : 'Summation',
+ txtLargeOperator_Sum_SubSup : 'Summation',
+ txtLargeOperator_Sum_CenterSub : 'Summation',
+ txtLargeOperator_Sum_Sub : 'Summation',
+ txtLargeOperator_Prod : 'Product',
+ txtLargeOperator_Prod_CenterSubSup : 'Product',
+ txtLargeOperator_Prod_SubSup : 'Product',
+ txtLargeOperator_Prod_CenterSub : 'Product',
+ txtLargeOperator_Prod_Sub : 'Product',
+ txtLargeOperator_CoProd : 'Co-Product',
+ txtLargeOperator_CoProd_CenterSubSup : 'Co-Product',
+ txtLargeOperator_CoProd_SubSup : 'Co-Product',
+ txtLargeOperator_CoProd_CenterSub : 'Co-Product',
+ txtLargeOperator_CoProd_Sub : 'Co-Product',
+ txtLargeOperator_Union : 'Union',
+ txtLargeOperator_Union_CenterSubSup : 'Union',
+ txtLargeOperator_Union_SubSup : 'Union',
+ txtLargeOperator_Union_CenterSub : 'Union',
+ txtLargeOperator_Union_Sub : 'Union',
+ txtLargeOperator_Intersection : 'Intersection',
+ txtLargeOperator_Intersection_CenterSubSup : 'Intersection',
+ txtLargeOperator_Intersection_SubSup : 'Intersection',
+ txtLargeOperator_Intersection_CenterSub : 'Intersection',
+ txtLargeOperator_Intersection_Sub : 'Intersection',
+ txtLargeOperator_Disjunction : 'Vee',
+ txtLargeOperator_Disjunction_CenterSubSup : 'Vee',
+ txtLargeOperator_Disjunction_SubSup : 'Vee',
+ txtLargeOperator_Disjunction_CenterSub : 'Vee',
+ txtLargeOperator_Disjunction_Sub : 'Vee',
+ txtLargeOperator_Conjunction : 'Wedge',
+ txtLargeOperator_Conjunction_CenterSubSup : 'Wedge',
+ txtLargeOperator_Conjunction_SubSup : 'Wedge',
+ txtLargeOperator_Conjunction_CenterSub : 'Wedge',
+ txtLargeOperator_Conjunction_Sub : 'Wedge',
+ txtLargeOperator_Custom_1 : 'Summation',
+ txtLargeOperator_Custom_2 : 'Summation',
+ txtLargeOperator_Custom_3 : 'Summation',
+ txtLargeOperator_Custom_4 : 'Product',
+ txtLargeOperator_Custom_5 : 'Union',
+
+ txtBracket_Round : 'Brackets',
+ txtBracket_Square : 'Brackets',
+ txtBracket_Curve : 'Brackets',
+ txtBracket_Angle : 'Brackets',
+ txtBracket_LowLim : 'Brackets',
+ txtBracket_UppLim : 'Brackets',
+ txtBracket_Line : 'Brackets',
+ txtBracket_LineDouble : 'Brackets',
+ txtBracket_Square_OpenOpen : 'Brackets',
+ txtBracket_Square_CloseClose : 'Brackets',
+ txtBracket_Square_CloseOpen : 'Brackets',
+ txtBracket_SquareDouble : 'Brackets',
+
+ txtBracket_Round_Delimiter_2 : 'Brackets with Separators',
+ txtBracket_Curve_Delimiter_2 : 'Brackets with Separators',
+ txtBracket_Angle_Delimiter_2 : 'Brackets with Separators',
+ txtBracket_Angle_Delimiter_3 : 'Brackets with Separators',
+ txtBracket_Round_OpenNone : 'Single Bracket',
+ txtBracket_Round_NoneOpen : 'Single Bracket',
+ txtBracket_Square_OpenNone : 'Single Bracket',
+ txtBracket_Square_NoneOpen : 'Single Bracket',
+ txtBracket_Curve_OpenNone : 'Single Bracket',
+ txtBracket_Curve_NoneOpen : 'Single Bracket',
+ txtBracket_Angle_OpenNone : 'Single Bracket',
+ txtBracket_Angle_NoneOpen : 'Single Bracket',
+ txtBracket_LowLim_OpenNone : 'Single Bracket',
+ txtBracket_LowLim_NoneNone : 'Single Bracket',
+ txtBracket_UppLim_OpenNone : 'Single Bracket',
+ txtBracket_UppLim_NoneOpen : 'Single Bracket',
+ txtBracket_Line_OpenNone : 'Single Bracket',
+ txtBracket_Line_NoneOpen : 'Single Bracket',
+ txtBracket_LineDouble_OpenNone : 'Single Bracket',
+ txtBracket_LineDouble_NoneOpen : 'Single Bracket',
+ txtBracket_SquareDouble_OpenNone : 'Single Bracket',
+ txtBracket_SquareDouble_NoneOpen : 'Single Bracket',
+ txtBracket_Custom_1 : 'Case (Two Conditions)',
+ txtBracket_Custom_2 : 'Cases (Three Conditions)',
+ txtBracket_Custom_3 : 'Stack Object',
+ txtBracket_Custom_4 : 'Stack Object',
+ txtBracket_Custom_5 : 'Cases Example',
+ txtBracket_Custom_6 : 'Binomial Coefficient',
+ txtBracket_Custom_7 : 'Binomial Coefficient',
+
+ txtFunction_Sin : 'Sine Function',
+ txtFunction_Cos : 'Cosine Function',
+ txtFunction_Tan : 'Tangent Function',
+ txtFunction_Csc : 'Cosecant Function',
+ txtFunction_Sec : 'Secant Function',
+ txtFunction_Cot : 'Cotangent Function',
+ txtFunction_1_Sin : 'Inverse Sine Function',
+ txtFunction_1_Cos : 'Inverse Cosine Function',
+ txtFunction_1_Tan : 'Inverse Tangent Function',
+ txtFunction_1_Csc : 'Inverse Cosecant Function',
+ txtFunction_1_Sec : 'Inverse Secant Function',
+ txtFunction_1_Cot : 'Inverse Cotangent Function',
+ txtFunction_Sinh : 'Hyperbolic Sine Function',
+ txtFunction_Cosh : 'Hyperbolic Cosine Function',
+ txtFunction_Tanh : 'Hyperbolic Tangent Function',
+ txtFunction_Csch : 'Hyperbolic Cosecant Function',
+ txtFunction_Sech : 'Hyperbolic Secant Function',
+ txtFunction_Coth : 'Hyperbolic Cotangent Function',
+ txtFunction_1_Sinh : 'Hyperbolic Inverse Sine Function',
+ txtFunction_1_Cosh : 'Hyperbolic Inverse Cosine Function',
+ txtFunction_1_Tanh : 'Hyperbolic Inverse Tangent Function',
+ txtFunction_1_Csch : 'Hyperbolic Inverse Cosecant Function',
+ txtFunction_1_Sech : 'Hyperbolic Inverse Secant Function',
+ txtFunction_1_Coth : 'Hyperbolic Inverse Cotangent Function',
+ txtFunction_Custom_1 : 'Sine theta',
+ txtFunction_Custom_2 : 'Cos 2x',
+ txtFunction_Custom_3 : 'Tangent formula',
+
+ txtAccent_Dot : 'Dot',
+ txtAccent_DDot : 'Double Dot',
+ txtAccent_DDDot : 'Triple Dot',
+ txtAccent_Hat : 'Hat',
+ txtAccent_Check : 'Check',
+ txtAccent_Accent : 'Acute',
+ txtAccent_Grave : 'Grave',
+ txtAccent_Smile : 'Breve',
+ txtAccent_Tilde : 'Tilde',
+ txtAccent_Bar : 'Bar',
+ txtAccent_DoubleBar : 'Double Overbar',
+ txtAccent_CurveBracketTop : 'Overbrace',
+ txtAccent_CurveBracketBot : 'Underbrace',
+ txtAccent_GroupTop : 'Grouping Character Above',
+ txtAccent_GroupBot : 'Grouping Character Below',
+ txtAccent_ArrowL : 'Leftwards Arrow Above',
+ txtAccent_ArrowR : 'Rightwards Arrow Above',
+ txtAccent_ArrowD : 'Right-Left Arrow Above',
+ txtAccent_HarpoonL : 'Leftwards Harpoon Above',
+ txtAccent_HarpoonR : 'Rightwards Harpoon Above',
+ txtAccent_BorderBox : 'Boxed Formula (With Placeholder)',
+ txtAccent_BorderBoxCustom : 'Boxed Formula (Example)',
+ txtAccent_BarTop : 'Overbar',
+ txtAccent_BarBot : 'Underbar',
+ txtAccent_Custom_1 : 'Vector A',
+ txtAccent_Custom_2 : 'ABC With Overbar',
+ txtAccent_Custom_3 : 'x XOR y With Overbar',
+
+ txtLimitLog_LogBase : 'Logarithm',
+ txtLimitLog_Log : 'Logarithm',
+ txtLimitLog_Lim : 'Limit',
+ txtLimitLog_Min : 'Minimum',
+ txtLimitLog_Max : 'Maximum',
+ txtLimitLog_Ln : 'Natural Logarithm',
+ txtLimitLog_Custom_1 : 'Limit Example',
+ txtLimitLog_Custom_2 : 'Maximum Example',
+
+ txtOperator_ColonEquals : 'Colon Equal',
+ txtOperator_EqualsEquals : 'Equal Equal',
+ txtOperator_PlusEquals : 'Plus Equal',
+ txtOperator_MinusEquals : 'Minus Equal',
+ txtOperator_Definition : 'Equal to By Definition',
+ txtOperator_UnitOfMeasure : 'Measured By',
+ txtOperator_DeltaEquals : 'Delta Equal To',
+ txtOperator_ArrowL_Top : 'Leftwards Arrow Above',
+ txtOperator_ArrowR_Top : 'Rightwards Arrow Above',
+ txtOperator_ArrowL_Bot : 'Leftwards Arrow Below',
+ txtOperator_ArrowR_Bot : 'Rightwards Arrow Below',
+ txtOperator_DoubleArrowL_Top : 'Leftwards Arrow Above',
+ txtOperator_DoubleArrowR_Top : 'Rightwards Arrow Above',
+ txtOperator_DoubleArrowL_Bot : 'Leftwards Arrow Below',
+ txtOperator_DoubleArrowR_Bot : 'Rightwards Arrow Below',
+ txtOperator_ArrowD_Top : 'Right-Left Arrow Above',
+ txtOperator_ArrowD_Bot : 'Right-Left Arrow Above',
+ txtOperator_DoubleArrowD_Top : 'Right-Left Arrow Below',
+ txtOperator_DoubleArrowD_Bot : 'Right-Left Arrow Below',
+ txtOperator_Custom_1 : 'Yileds',
+ txtOperator_Custom_2 : 'Delta Yields',
+
+ txtMatrix_1_2 : '1x2 Empty Matrix',
+ txtMatrix_2_1 : '2x1 Empty Matrix',
+ txtMatrix_1_3 : '1x3 Empty Matrix',
+ txtMatrix_3_1 : '3x1 Empty Matrix',
+ txtMatrix_2_2 : '2x2 Empty Matrix',
+ txtMatrix_2_3 : '2x3 Empty Matrix',
+ txtMatrix_3_2 : '3x2 Empty Matrix',
+ txtMatrix_3_3 : '3x3 Empty Matrix',
+ txtMatrix_Dots_Center : 'Midline Dots',
+ txtMatrix_Dots_Baseline : 'Baseline Dots',
+ txtMatrix_Dots_Vertical : 'Vertical Dots',
+ txtMatrix_Dots_Diagonal : 'Diagonal Dots',
+ txtMatrix_Identity_2 : '2x2 Identity Matrix',
+ txtMatrix_Identity_2_NoZeros : '3x3 Identity Matrix',
+ txtMatrix_Identity_3 : '3x3 Identity Matrix',
+ txtMatrix_Identity_3_NoZeros : '3x3 Identity Matrix',
+ txtMatrix_2_2_RoundBracket : 'Empty Matrix with Brackets',
+ txtMatrix_2_2_SquareBracket : 'Empty Matrix with Brackets',
+ txtMatrix_2_2_LineBracket : 'Empty Matrix with Brackets',
+ txtMatrix_2_2_DLineBracket : 'Empty Matrix with Brackets',
+ txtMatrix_Flat_Round : 'Sparse Matrix',
+ txtMatrix_Flat_Square : 'Sparse Matrix'
+
}, PE.Controllers.Toolbar || {}));
});
\ No newline at end of file
diff --git a/apps/presentationeditor/main/app/model/EquationGroup.js b/apps/presentationeditor/main/app/model/EquationGroup.js
new file mode 100644
index 000000000..258a28dfa
--- /dev/null
+++ b/apps/presentationeditor/main/app/model/EquationGroup.js
@@ -0,0 +1,71 @@
+/*
+ *
+ * (c) Copyright Ascensio System Limited 2010-2016
+ *
+ * This program is a free software product. You can redistribute it and/or
+ * modify it under the terms of the GNU Affero General Public License (AGPL)
+ * version 3 as published by the Free Software Foundation. In accordance with
+ * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
+ * that Ascensio System SIA expressly excludes the warranty of non-infringement
+ * of any third-party rights.
+ *
+ * This program is distributed WITHOUT ANY WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
+ * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
+ *
+ * You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
+ * EU, LV-1021.
+ *
+ * The interactive user interfaces in modified source and object code versions
+ * of the Program must display Appropriate Legal Notices, as required under
+ * Section 5 of the GNU AGPL version 3.
+ *
+ * Pursuant to Section 7(b) of the License you must retain the original Product
+ * logo when distributing the program. Pursuant to Section 7(e) we decline to
+ * grant you any rights under trademark law for use of our trademarks.
+ *
+ * All the Product's GUI elements, including illustrations and icon sets, as
+ * well as technical writing content are licensed under the terms of the
+ * Creative Commons Attribution-ShareAlike 4.0 International. See the License
+ * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
+ *
+*/
+/**
+ * EquationGroup.js
+ *
+ * Created by Alexey Musinov on 29/10/14
+ * Copyright (c) 2014 Ascensio System SIA. All rights reserved.
+ *
+ */
+
+
+define([
+ 'backbone'
+], function(Backbone){ 'use strict';
+
+ PE.Models = PE.Models || {};
+
+ PE.Models.EquationModel = Backbone.Model.extend({
+ defaults: function() {
+ return {
+ id : Common.UI.getId(),
+ data : null,
+ width : 0,
+ height : 0,
+ posX : 0,
+ posY : 0
+ }
+ }
+ });
+
+ PE.Models.EquationGroup = Backbone.Model.extend({
+ defaults: function() {
+ return {
+ id : Common.UI.getId(),
+ groupName : null,
+ groupId : null,
+ groupStore : null
+ }
+ }
+ });
+});
diff --git a/apps/presentationeditor/main/app/template/Toolbar.template b/apps/presentationeditor/main/app/template/Toolbar.template
index e00acacc4..aa3993020 100644
--- a/apps/presentationeditor/main/app/template/Toolbar.template
+++ b/apps/presentationeditor/main/app/template/Toolbar.template
@@ -163,6 +163,7 @@
+
diff --git a/apps/presentationeditor/main/app/view/DocumentHolder.js b/apps/presentationeditor/main/app/view/DocumentHolder.js
index 30dddf552..9e2c73086 100644
--- a/apps/presentationeditor/main/app/view/DocumentHolder.js
+++ b/apps/presentationeditor/main/app/view/DocumentHolder.js
@@ -62,6 +62,9 @@ define([
me._TtHeight = 20;
me.slidesCount = 0;
me.fastcoauthtips = [];
+ me._currentMathObj = undefined;
+ me._currentParaObjDisabled = false;
+
/** coauthoring begin **/
var usersStore = PE.getCollection('Common.Collections.Users');
/** coauthoring end **/
@@ -156,6 +159,10 @@ define([
if ( (menu_props.shapeProps && menu_props.shapeProps.value || menu_props.chartProps && menu_props.chartProps.value)&& // text in shape, need to show paragraph menu with vertical align
_.isUndefined(menu_props.tableProps))
menu_to_show = me.textMenu;
+ } else if (Asc.c_oAscTypeSelectElement.Math == elType) {
+ menu_props.mathProps = {};
+ menu_props.mathProps.value = elValue;
+ me._currentMathObj = elValue;
}
});
if (menu_to_show === null) {
@@ -632,6 +639,623 @@ define([
}
};
+ this.initEquationMenu = function() {
+ if (!me._currentMathObj) return;
+ var type = me._currentMathObj.get_Type(),
+ value = me._currentMathObj,
+ mnu, arr = [];
+
+ switch (type) {
+ case Asc.c_oAscMathInterfaceType.Accent:
+ mnu = new Common.UI.MenuItem({
+ caption : me.txtRemoveAccentChar,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ equationProps: {type: type, callback: 'remove_AccentCharacter'}
+ });
+ arr.push(mnu);
+ break;
+ case Asc.c_oAscMathInterfaceType.BorderBox:
+ mnu = new Common.UI.MenuItem({
+ caption : me.txtBorderProps,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ menu : new Common.UI.Menu({
+ menuAlign: 'tl-tr',
+ items : [
+ {
+ caption: value.get_HideTop() ? me.txtAddTop : me.txtHideTop,
+ equationProps: {type: type, callback: 'put_HideTop', value: !value.get_HideTop()}
+ },
+ {
+ caption: value.get_HideBottom() ? me.txtAddBottom : me.txtHideBottom,
+ equationProps: {type: type, callback: 'put_HideBottom', value: !value.get_HideBottom()}
+ },
+ {
+ caption: value.get_HideLeft() ? me.txtAddLeft : me.txtHideLeft,
+ equationProps: {type: type, callback: 'put_HideLeft', value: !value.get_HideLeft()}
+ },
+ {
+ caption: value.get_HideRight() ? me.txtAddRight : me.txtHideRight,
+ equationProps: {type: type, callback: 'put_HideRight', value: !value.get_HideRight()}
+ },
+ {
+ caption: value.get_HideHor() ? me.txtAddHor : me.txtHideHor,
+ equationProps: {type: type, callback: 'put_HideHor', value: !value.get_HideHor()}
+ },
+ {
+ caption: value.get_HideVer() ? me.txtAddVer : me.txtHideVer,
+ equationProps: {type: type, callback: 'put_HideVer', value: !value.get_HideVer()}
+ },
+ {
+ caption: value.get_HideTopLTR() ? me.txtAddLT : me.txtHideLT,
+ equationProps: {type: type, callback: 'put_HideTopLTR', value: !value.get_HideTopLTR()}
+ },
+ {
+ caption: value.get_HideTopRTL() ? me.txtAddLB : me.txtHideLB,
+ equationProps: {type: type, callback: 'put_HideTopRTL', value: !value.get_HideTopRTL()}
+ }
+ ]
+ })
+ });
+ arr.push(mnu);
+ break;
+ case Asc.c_oAscMathInterfaceType.Bar:
+ mnu = new Common.UI.MenuItem({
+ caption : me.txtRemoveBar,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ equationProps: {type: type, callback: 'remove_Bar'}
+ });
+ arr.push(mnu);
+ mnu = new Common.UI.MenuItem({
+ caption : (value.get_Pos()==Asc.c_oAscMathInterfaceBarPos.Top) ? me.txtUnderbar : me.txtOverbar,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ equationProps: {type: type, callback: 'put_Pos', value: (value.get_Pos()==Asc.c_oAscMathInterfaceBarPos.Top) ? Asc.c_oAscMathInterfaceBarPos.Bottom : Asc.c_oAscMathInterfaceBarPos.Top}
+ });
+ arr.push(mnu);
+ break;
+ case Asc.c_oAscMathInterfaceType.Script:
+ var scripttype = value.get_ScriptType();
+ if (scripttype == Asc.c_oAscMathInterfaceScript.PreSubSup) {
+ mnu = new Common.UI.MenuItem({
+ caption : me.txtScriptsAfter,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ equationProps: {type: type, callback: 'put_ScriptType', value: Asc.c_oAscMathInterfaceScript.SubSup}
+ });
+ arr.push(mnu);
+ mnu = new Common.UI.MenuItem({
+ caption : me.txtRemScripts,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ equationProps: {type: type, callback: 'put_ScriptType', value: Asc.c_oAscMathInterfaceScript.None}
+ });
+ arr.push(mnu);
+ } else {
+ if (scripttype == Asc.c_oAscMathInterfaceScript.SubSup) {
+ mnu = new Common.UI.MenuItem({
+ caption : me.txtScriptsBefore,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ equationProps: {type: type, callback: 'put_ScriptType', value: Asc.c_oAscMathInterfaceScript.PreSubSup}
+ });
+ arr.push(mnu);
+ }
+ if (scripttype == Asc.c_oAscMathInterfaceScript.SubSup || scripttype == Asc.c_oAscMathInterfaceScript.Sub ) {
+ mnu = new Common.UI.MenuItem({
+ caption : me.txtRemSubscript,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ equationProps: {type: type, callback: 'put_ScriptType', value: (scripttype == Asc.c_oAscMathInterfaceScript.SubSup) ? Asc.c_oAscMathInterfaceScript.Sup : Asc.c_oAscMathInterfaceScript.None }
+ });
+ arr.push(mnu);
+ }
+ if (scripttype == Asc.c_oAscMathInterfaceScript.SubSup || scripttype == Asc.c_oAscMathInterfaceScript.Sup ) {
+ mnu = new Common.UI.MenuItem({
+ caption : me.txtRemSuperscript,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ equationProps: {type: type, callback: 'put_ScriptType', value: (scripttype == Asc.c_oAscMathInterfaceScript.SubSup) ? Asc.c_oAscMathInterfaceScript.Sub : Asc.c_oAscMathInterfaceScript.None }
+ });
+ arr.push(mnu);
+ }
+ }
+ break;
+ case Asc.c_oAscMathInterfaceType.Fraction:
+ var fraction = value.get_FractionType();
+ if (fraction==Asc.c_oAscMathInterfaceFraction.Skewed || fraction==Asc.c_oAscMathInterfaceFraction.Linear) {
+ mnu = new Common.UI.MenuItem({
+ caption : me.txtFractionStacked,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ equationProps: {type: type, callback: 'put_FractionType', value: Asc.c_oAscMathInterfaceFraction.Bar}
+ });
+ arr.push(mnu);
+ }
+ if (fraction==Asc.c_oAscMathInterfaceFraction.Bar || fraction==Asc.c_oAscMathInterfaceFraction.Linear) {
+ mnu = new Common.UI.MenuItem({
+ caption : me.txtFractionSkewed,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ equationProps: {type: type, callback: 'put_FractionType', value: Asc.c_oAscMathInterfaceFraction.Skewed}
+ });
+ arr.push(mnu);
+ }
+ if (fraction==Asc.c_oAscMathInterfaceFraction.Bar || fraction==Asc.c_oAscMathInterfaceFraction.Skewed) {
+ mnu = new Common.UI.MenuItem({
+ caption : me.txtFractionLinear,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ equationProps: {type: type, callback: 'put_FractionType', value: Asc.c_oAscMathInterfaceFraction.Linear}
+ });
+ arr.push(mnu);
+ }
+ if (fraction==Asc.c_oAscMathInterfaceFraction.Bar || fraction==Asc.c_oAscMathInterfaceFraction.NoBar) {
+ mnu = new Common.UI.MenuItem({
+ caption : (fraction==Asc.c_oAscMathInterfaceFraction.Bar) ? me.txtRemFractionBar : me.txtAddFractionBar,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ equationProps: {type: type, callback: 'put_FractionType', value: (fraction==Asc.c_oAscMathInterfaceFraction.Bar) ? Asc.c_oAscMathInterfaceFraction.NoBar : Asc.c_oAscMathInterfaceFraction.Bar}
+ });
+ arr.push(mnu);
+ }
+ break;
+ case Asc.c_oAscMathInterfaceType.Limit:
+ mnu = new Common.UI.MenuItem({
+ caption : (value.get_Pos()==Asc.c_oAscMathInterfaceLimitPos.Top) ? me.txtLimitUnder : me.txtLimitOver,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ equationProps: {type: type, callback: 'put_Pos', value: (value.get_Pos()==Asc.c_oAscMathInterfaceLimitPos.Top) ? Asc.c_oAscMathInterfaceLimitPos.Bottom : Asc.c_oAscMathInterfaceLimitPos.Top}
+ });
+ arr.push(mnu);
+ mnu = new Common.UI.MenuItem({
+ caption : me.txtRemLimit,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ equationProps: {type: type, callback: 'put_Pos', value: Asc.c_oAscMathInterfaceLimitPos.None}
+ });
+ arr.push(mnu);
+ break;
+ case Asc.c_oAscMathInterfaceType.Matrix:
+ mnu = new Common.UI.MenuItem({
+ caption : value.get_HidePlaceholder() ? me.txtShowPlaceholder : me.txtHidePlaceholder,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ equationProps: {type: type, callback: 'put_HidePlaceholder', value: !value.get_HidePlaceholder()}
+ });
+ arr.push(mnu);
+ mnu = new Common.UI.MenuItem({
+ caption : me.insertText,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ menu : new Common.UI.Menu({
+ menuAlign: 'tl-tr',
+ items : [
+ {
+ caption: me.insertRowAboveText,
+ equationProps: {type: type, callback: 'insert_MatrixRow', value: true}
+ },
+ {
+ caption: me.insertRowBelowText,
+ equationProps: {type: type, callback: 'insert_MatrixRow', value: false}
+ },
+ {
+ caption: me.insertColumnLeftText,
+ equationProps: {type: type, callback: 'insert_MatrixColumn', value: true}
+ },
+ {
+ caption: me.insertColumnRightText,
+ equationProps: {type: type, callback: 'insert_MatrixColumn', value: false}
+ }
+ ]
+ })
+ });
+ arr.push(mnu);
+ mnu = new Common.UI.MenuItem({
+ caption : me.deleteText,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ menu : new Common.UI.Menu({
+ menuAlign: 'tl-tr',
+ items : [
+ {
+ caption: me.deleteRowText,
+ equationProps: {type: type, callback: 'delete_MatrixRow'}
+ },
+ {
+ caption: me.deleteColumnText,
+ equationProps: {type: type, callback: 'delete_MatrixColumn'}
+ }
+ ]
+ })
+ });
+ arr.push(mnu);
+ mnu = new Common.UI.MenuItem({
+ caption : me.txtMatrixAlign,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ menu : new Common.UI.Menu({
+ menuAlign: 'tl-tr',
+ items : [
+ {
+ caption: me.txtTop,
+ checkable : true,
+ checked : (value.get_MatrixAlign()==Asc.c_oAscMathInterfaceMatrixMatrixAlign.Top),
+ equationProps: {type: type, callback: 'put_MatrixAlign', value: Asc.c_oAscMathInterfaceMatrixMatrixAlign.Top}
+ },
+ {
+ caption: me.centerText,
+ checkable : true,
+ checked : (value.get_MatrixAlign()==Asc.c_oAscMathInterfaceMatrixMatrixAlign.Center),
+ equationProps: {type: type, callback: 'put_MatrixAlign', value: Asc.c_oAscMathInterfaceMatrixMatrixAlign.Center}
+ },
+ {
+ caption: me.txtBottom,
+ checkable : true,
+ checked : (value.get_MatrixAlign()==Asc.c_oAscMathInterfaceMatrixMatrixAlign.Bottom),
+ equationProps: {type: type, callback: 'put_MatrixAlign', value: Asc.c_oAscMathInterfaceMatrixMatrixAlign.Bottom}
+ }
+ ]
+ })
+ });
+ arr.push(mnu);
+ mnu = new Common.UI.MenuItem({
+ caption : me.txtColumnAlign,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ menu : new Common.UI.Menu({
+ menuAlign: 'tl-tr',
+ items : [
+ {
+ caption: me.leftText,
+ checkable : true,
+ checked : (value.get_ColumnAlign()==Asc.c_oAscMathInterfaceMatrixColumnAlign.Left),
+ equationProps: {type: type, callback: 'put_ColumnAlign', value: Asc.c_oAscMathInterfaceMatrixColumnAlign.Left}
+ },
+ {
+ caption: me.centerText,
+ checkable : true,
+ checked : (value.get_ColumnAlign()==Asc.c_oAscMathInterfaceMatrixColumnAlign.Center),
+ equationProps: {type: type, callback: 'put_ColumnAlign', value: Asc.c_oAscMathInterfaceMatrixColumnAlign.Center}
+ },
+ {
+ caption: me.rightText,
+ checkable : true,
+ checked : (value.get_ColumnAlign()==Asc.c_oAscMathInterfaceMatrixColumnAlign.Right),
+ equationProps: {type: type, callback: 'put_ColumnAlign', value: Asc.c_oAscMathInterfaceMatrixColumnAlign.Right}
+ }
+ ]
+ })
+ });
+ arr.push(mnu);
+ break;
+ case Asc.c_oAscMathInterfaceType.EqArray:
+ mnu = new Common.UI.MenuItem({
+ caption : me.txtInsertEqBefore,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ equationProps: {type: type, callback: 'insert_Equation', value: true}
+ });
+ arr.push(mnu);
+ mnu = new Common.UI.MenuItem({
+ caption : me.txtInsertEqAfter,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ equationProps: {type: type, callback: 'insert_Equation', value: false}
+ });
+ arr.push(mnu);
+ mnu = new Common.UI.MenuItem({
+ caption : me.txtDeleteEq,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ equationProps: {type: type, callback: 'delete_Equation'}
+ });
+ arr.push(mnu);
+ mnu = new Common.UI.MenuItem({
+ caption : me.alignmentText,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ menu : new Common.UI.Menu({
+ menuAlign: 'tl-tr',
+ items : [
+ {
+ caption: me.txtTop,
+ checkable : true,
+ checked : (value.get_Align()==Asc.c_oAscMathInterfaceEqArrayAlign.Top),
+ equationProps: {type: type, callback: 'put_Align', value: Asc.c_oAscMathInterfaceEqArrayAlign.Top}
+ },
+ {
+ caption: me.centerText,
+ checkable : true,
+ checked : (value.get_Align()==Asc.c_oAscMathInterfaceEqArrayAlign.Center),
+ equationProps: {type: type, callback: 'put_Align', value: Asc.c_oAscMathInterfaceEqArrayAlign.Center}
+ },
+ {
+ caption: me.txtBottom,
+ checkable : true,
+ checked : (value.get_Align()==Asc.c_oAscMathInterfaceEqArrayAlign.Bottom),
+ equationProps: {type: type, callback: 'put_Align', value: Asc.c_oAscMathInterfaceEqArrayAlign.Bottom}
+ }
+ ]
+ })
+ });
+ arr.push(mnu);
+ break;
+ case Asc.c_oAscMathInterfaceType.LargeOperator:
+ mnu = new Common.UI.MenuItem({
+ caption : me.txtLimitChange,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ equationProps: {type: type, callback: 'put_LimitLocation', value: (value.get_LimitLocation() == Asc.c_oAscMathInterfaceNaryLimitLocation.UndOvr) ? Asc.c_oAscMathInterfaceNaryLimitLocation.SubSup : Asc.c_oAscMathInterfaceNaryLimitLocation.UndOvr}
+ });
+ arr.push(mnu);
+ if (value.get_HideUpper() !== undefined) {
+ mnu = new Common.UI.MenuItem({
+ caption : value.get_HideUpper() ? me.txtShowTopLimit : me.txtHideTopLimit,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ equationProps: {type: type, callback: 'put_HideUpper', value: !value.get_HideUpper()}
+ });
+ arr.push(mnu);
+ }
+ if (value.get_HideLower() !== undefined) {
+ mnu = new Common.UI.MenuItem({
+ caption : value.get_HideLower() ? me.txtShowBottomLimit : me.txtHideBottomLimit,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ equationProps: {type: type, callback: 'put_HideLower', value: !value.get_HideLower()}
+ });
+ arr.push(mnu);
+ }
+ break;
+ case Asc.c_oAscMathInterfaceType.Delimiter:
+ mnu = new Common.UI.MenuItem({
+ caption : me.txtInsertArgBefore,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ equationProps: {type: type, callback: 'insert_DelimiterArgument', value: true}
+ });
+ arr.push(mnu);
+ mnu = new Common.UI.MenuItem({
+ caption : me.txtInsertArgAfter,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ equationProps: {type: type, callback: 'insert_DelimiterArgument', value: false}
+ });
+ arr.push(mnu);
+ if (value.can_DeleteArgument()) {
+ mnu = new Common.UI.MenuItem({
+ caption : me.txtDeleteArg,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ equationProps: {type: type, callback: 'delete_DelimiterArgument'}
+ });
+ arr.push(mnu);
+ }
+ mnu = new Common.UI.MenuItem({
+ caption : value.has_Separators() ? me.txtDeleteCharsAndSeparators : me.txtDeleteChars,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ equationProps: {type: type, callback: 'remove_DelimiterCharacters'}
+ });
+ arr.push(mnu);
+ mnu = new Common.UI.MenuItem({
+ caption : value.get_HideOpeningBracket() ? me.txtShowOpenBracket : me.txtHideOpenBracket,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ equationProps: {type: type, callback: 'put_HideOpeningBracket', value: !value.get_HideOpeningBracket()}
+ });
+ arr.push(mnu);
+ mnu = new Common.UI.MenuItem({
+ caption : value.get_HideClosingBracket() ? me.txtShowCloseBracket : me.txtHideCloseBracket,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ equationProps: {type: type, callback: 'put_HideClosingBracket', value: !value.get_HideClosingBracket()}
+ });
+ arr.push(mnu);
+ mnu = new Common.UI.MenuItem({
+ caption : me.txtStretchBrackets,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ checkable : true,
+ checked : value.get_StretchBrackets(),
+ equationProps: {type: type, callback: 'put_StretchBrackets', value: !value.get_StretchBrackets()}
+ });
+ arr.push(mnu);
+ mnu = new Common.UI.MenuItem({
+ caption : me.txtMatchBrackets,
+ equation : true,
+ disabled : (!value.get_StretchBrackets() || me._currentParaObjDisabled),
+ checkable : true,
+ checked : value.get_StretchBrackets() && value.get_MatchBrackets(),
+ equationProps: {type: type, callback: 'put_MatchBrackets', value: !value.get_MatchBrackets()}
+ });
+ arr.push(mnu);
+ break;
+ case Asc.c_oAscMathInterfaceType.GroupChar:
+ if (value.can_ChangePos()) {
+ mnu = new Common.UI.MenuItem({
+ caption : (value.get_Pos()==Asc.c_oAscMathInterfaceGroupCharPos.Top) ? me.txtGroupCharUnder : me.txtGroupCharOver,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ equationProps: {type: type, callback: 'put_Pos', value: (value.get_Pos()==Asc.c_oAscMathInterfaceGroupCharPos.Top) ? Asc.c_oAscMathInterfaceGroupCharPos.Bottom : Asc.c_oAscMathInterfaceGroupCharPos.Top}
+ });
+ arr.push(mnu);
+ mnu = new Common.UI.MenuItem({
+ caption : me.txtDeleteGroupChar,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ equationProps: {type: type, callback: 'put_Pos', value: Asc.c_oAscMathInterfaceGroupCharPos.None}
+ });
+ arr.push(mnu);
+ }
+ break;
+ case Asc.c_oAscMathInterfaceType.Radical:
+ if (value.get_HideDegree() !== undefined) {
+ mnu = new Common.UI.MenuItem({
+ caption : value.get_HideDegree() ? me.txtShowDegree : me.txtHideDegree,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ equationProps: {type: type, callback: 'put_HideDegree', value: !value.get_HideDegree()}
+ });
+ arr.push(mnu);
+ }
+ mnu = new Common.UI.MenuItem({
+ caption : me.txtDeleteRadical,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ equationProps: {type: type, callback: 'remove_Radical'}
+ });
+ arr.push(mnu);
+ break;
+ }
+ if (value.can_IncreaseArgumentSize()) {
+ mnu = new Common.UI.MenuItem({
+ caption : me.txtIncreaseArg,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ equationProps: {type: type, callback: 'increase_ArgumentSize'}
+ });
+ arr.push(mnu);
+ }
+ if (value.can_DecreaseArgumentSize()) {
+ mnu = new Common.UI.MenuItem({
+ caption : me.txtDecreaseArg,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ equationProps: {type: type, callback: 'decrease_ArgumentSize'}
+ });
+ arr.push(mnu);
+ }
+ if (value.can_InsertManualBreak()) {
+ mnu = new Common.UI.MenuItem({
+ caption : me.txtInsertBreak,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ equationProps: {type: type, callback: 'insert_ManualBreak'}
+ });
+ arr.push(mnu);
+ }
+ if (value.can_DeleteManualBreak()) {
+ mnu = new Common.UI.MenuItem({
+ caption : me.txtDeleteBreak,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ equationProps: {type: type, callback: 'delete_ManualBreak'}
+ });
+ arr.push(mnu);
+ }
+ if (value.can_AlignToCharacter()) {
+ mnu = new Common.UI.MenuItem({
+ caption : me.txtAlignToChar,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ equationProps: {type: type, callback: 'align_ToCharacter'}
+ });
+ arr.push(mnu);
+ }
+ return arr;
+ };
+
+ this.addEquationMenu = function(isParagraph, insertIdx) {
+ if (_.isUndefined(isParagraph)) {
+ isParagraph = me.textMenu.isVisible();
+ }
+
+ me.clearEquationMenu(isParagraph, insertIdx);
+
+ var equationMenu = (isParagraph) ? me.textMenu : me.tableMenu,
+ menuItems = me.initEquationMenu();
+
+ if (menuItems.length > 0) {
+ _.each(menuItems, function(menuItem, index) {
+ if (menuItem.menu) {
+ _.each(menuItem.menu.items, function(item) {
+ item.on('click', _.bind(me.equationCallback, me, item.options.equationProps));
+ });
+ } else
+ menuItem.on('click', _.bind(me.equationCallback, me, menuItem.options.equationProps));
+ equationMenu.insertItem(insertIdx, menuItem);
+ insertIdx++;
+ });
+ }
+ return menuItems.length;
+ };
+
+ this.clearEquationMenu = function(isParagraph, insertIdx) {
+ var equationMenu = (isParagraph) ? me.textMenu : me.tableMenu;
+ for (var i = insertIdx; i < equationMenu.items.length; i++) {
+ if (equationMenu.items[i].options.equation) {
+ if (equationMenu.items[i].menu) {
+ _.each(equationMenu.items[i].menu.items, function(item) {
+ item.off('click');
+ });
+ } else
+ equationMenu.items[i].off('click');
+ equationMenu.removeItem(equationMenu.items[i]);
+ i--;
+ } else
+ break;
+ }
+ };
+
+ this.equationCallback = function(eqProps) {
+ if (eqProps) {
+ var eqObj;
+ switch (eqProps.type) {
+ case Asc.c_oAscMathInterfaceType.Accent:
+ eqObj = new CMathMenuAccent();
+ break;
+ case Asc.c_oAscMathInterfaceType.BorderBox:
+ eqObj = new CMathMenuBorderBox();
+ break;
+ case Asc.c_oAscMathInterfaceType.Box:
+ eqObj = new CMathMenuBox();
+ break;
+ case Asc.c_oAscMathInterfaceType.Bar:
+ eqObj = new CMathMenuBar();
+ break;
+ case Asc.c_oAscMathInterfaceType.Script:
+ eqObj = new CMathMenuScript();
+ break;
+ case Asc.c_oAscMathInterfaceType.Fraction:
+ eqObj = new CMathMenuFraction();
+ break;
+ case Asc.c_oAscMathInterfaceType.Limit:
+ eqObj = new CMathMenuLimit();
+ break;
+ case Asc.c_oAscMathInterfaceType.Matrix:
+ eqObj = new CMathMenuMatrix();
+ break;
+ case Asc.c_oAscMathInterfaceType.EqArray:
+ eqObj = new CMathMenuEqArray();
+ break;
+ case Asc.c_oAscMathInterfaceType.LargeOperator:
+ eqObj = new CMathMenuNary();
+ break;
+ case Asc.c_oAscMathInterfaceType.Delimiter:
+ eqObj = new CMathMenuDelimiter();
+ break;
+ case Asc.c_oAscMathInterfaceType.GroupChar:
+ eqObj = new CMathMenuGroupCharacter();
+ break;
+ case Asc.c_oAscMathInterfaceType.Radical:
+ eqObj = new CMathMenuRadical();
+ break;
+ case Asc.c_oAscMathInterfaceType.Common:
+ eqObj = new CMathMenuBase();
+ break;
+ }
+ if (eqObj) {
+ eqObj[eqProps.callback](eqProps.value);
+ me.api.asc_SetMathProps(eqObj);
+ }
+ }
+ me.fireEvent('editcomplete', me);
+ };
+
this.changePosition = function() {
me._XY = [
me.cmpEl.offset().left - $(window).scrollLeft(),
@@ -1698,6 +2322,14 @@ define([
value : 'cut'
}).on('click', _.bind(me.onCutCopyPaste, me));
+ var menuEquationSeparator = new Common.UI.MenuItem({
+ caption : '--'
+ });
+
+ var menuEquationSeparatorInTable = new Common.UI.MenuItem({
+ caption : '--'
+ });
+
me.textMenu = new Common.UI.Menu({
initMenu: function(value){
var isInShape = (value.shapeProps && !_.isNull(value.shapeProps.value));
@@ -1706,9 +2338,11 @@ define([
var disabled = (value.paraProps!==undefined && value.paraProps.locked) ||
(value.slideProps!==undefined && value.slideProps.locked) ||
(isInShape && value.shapeProps.locked);
+ var isEquation= (value.mathProps && value.mathProps.value);
+ me._currentParaObjDisabled = disabled;
- menuParagraphVAlign.setVisible(isInShape && !isInChart); // после того, как заголовок можно будет растягивать по вертикали, вернуть "|| isInChart" !!
- menuParagraphDirection.setVisible(isInShape && !isInChart); // после того, как заголовок можно будет растягивать по вертикали, вернуть "|| isInChart" !!
+ menuParagraphVAlign.setVisible(isInShape && !isInChart && !isEquation); // после того, как заголовок можно будет растягивать по вертикали, вернуть "|| isInChart" !!
+ menuParagraphDirection.setVisible(isInShape && !isInChart && !isEquation); // после того, как заголовок можно будет растягивать по вертикали, вернуть "|| isInChart" !!
if (isInShape || isInChart) {
var align = value.shapeProps.value.get_VerticalTextAlign();
me.menuParagraphTop.setChecked(align == Asc.c_oAscVerticalTextAlign.TEXT_ALIGN_TOP);
@@ -1755,11 +2389,20 @@ define([
menuParagraphAdvanced.setDisabled(disabled);
menuParaCut.setDisabled(disabled);
menuParaPaste.setDisabled(disabled);
+
+ //equation menu
+ var eqlen = 0;
+ if (isEquation) {
+ eqlen = me.addEquationMenu(true, 4);
+ } else
+ me.clearEquationMenu(true, 4);
+ menuEquationSeparator.setVisible(isEquation && eqlen>0);
},
items: [
menuParaCut,
menuParaCopy,
menuParaPaste,
+ menuEquationSeparator,
{ caption: '--' },
menuParagraphVAlign,
menuParagraphDirection,
@@ -1787,6 +2430,11 @@ define([
if (_.isUndefined(value.tableProps))
return;
+ var isEquation= (value.mathProps && value.mathProps.value);
+ for (var i = 4; i < 14; i++) {
+ me.tableMenu.items[i].setVisible(!isEquation);
+ }
+
var disabled = (value.slideProps!==undefined && value.slideProps.locked);
me.menuTableCellTop.setChecked(value.tableProps.value.get_CellsVAlign() == Asc.c_oAscVertAlignJc.Top);
@@ -1826,14 +2474,22 @@ define([
if (!_.isUndefined(value.paraProps)) {
menuAddHyperlinkTable.setDisabled(value.paraProps.locked || disabled);
menuHyperlinkTable.setDisabled(value.paraProps.locked || disabled);
+ me._currentParaObjDisabled = value.paraProps.locked || disabled;
}
/** coauthoring begin **/
menuAddCommentTable.setVisible(me.api.can_AddQuotedComment()!==false && me.mode.canCoAuthoring && me.mode.canComments);
menuAddCommentTable.setDisabled(!_.isUndefined(value.paraProps) && value.paraProps.locked || disabled);
/** coauthoring end **/
-
menuHyperlinkSeparator.setVisible(menuAddHyperlinkTable.isVisible() || menuHyperlinkTable.isVisible() /** coauthoring begin **/|| menuAddCommentTable.isVisible()/** coauthoring end **/);
+
+ //equation menu
+ var eqlen = 0;
+ if (isEquation) {
+ eqlen = me.addEquationMenu(false, 4);
+ menuHyperlinkSeparator.setVisible(menuHyperlinkSeparator.isVisible() && eqlen>0);
+ } else
+ me.clearEquationMenu(false, 4);
},
items: [
menuTableCut,
@@ -2085,7 +2741,78 @@ define([
directionText: 'Text Direction',
directHText: 'Horizontal',
direct90Text: 'Rotate at 90°',
- direct270Text: 'Rotate at 270°'
+ direct270Text: 'Rotate at 270°',
+ txtRemoveAccentChar: 'Remove accent character',
+ txtBorderProps: 'Borders property',
+ txtHideTop: 'Hide top border',
+ txtHideBottom: 'Hide bottom border',
+ txtHideLeft: 'Hide left border',
+ txtHideRight: 'Hide right border',
+ txtHideHor: 'Hide horizontal line',
+ txtHideVer: 'Hide vertical line',
+ txtHideLT: 'Hide left top line',
+ txtHideLB: 'Hide left bottom line',
+ txtAddTop: 'Add top border',
+ txtAddBottom: 'Add bottom border',
+ txtAddLeft: 'Add left border',
+ txtAddRight: 'Add right border',
+ txtAddHor: 'Add horizontal line',
+ txtAddVer: 'Add vertical line',
+ txtAddLT: 'Add left top line',
+ txtAddLB: 'Add left bottom line',
+ txtRemoveBar: 'Remove bar',
+ txtOverbar: 'Bar over text',
+ txtUnderbar: 'Bar under text',
+ txtRemScripts: 'Remove scripts',
+ txtRemSubscript: 'Remove subscript',
+ txtRemSuperscript: 'Remove superscript',
+ txtScriptsAfter: 'Scripts after text',
+ txtScriptsBefore: 'Scripts before text',
+ txtFractionStacked: 'Change to stacked fraction',
+ txtFractionSkewed: 'Change to skewed fraction',
+ txtFractionLinear: 'Change to linear fraction',
+ txtRemFractionBar: 'Remove fraction bar',
+ txtAddFractionBar: 'Add fraction bar',
+ txtRemLimit: 'Remove limit',
+ txtLimitOver: 'Limit over text',
+ txtLimitUnder: 'Limit under text',
+ txtHidePlaceholder: 'Hide placeholder',
+ txtShowPlaceholder: 'Show placeholder',
+ txtMatrixAlign: 'Matrix alignment',
+ txtColumnAlign: 'Column alignment',
+ txtTop: 'Top',
+ txtBottom: 'Bottom',
+ txtInsertEqBefore: 'Insert equation before',
+ txtInsertEqAfter: 'Insert equation after',
+ txtDeleteEq: 'Delete equation',
+ txtLimitChange: 'Change limits location',
+ txtHideTopLimit: 'Hide top limit',
+ txtShowTopLimit: 'Show top limit',
+ txtHideBottomLimit: 'Hide bottom limit',
+ txtShowBottomLimit: 'Show bottom limit',
+ txtInsertArgBefore: 'Insert argument before',
+ txtInsertArgAfter: 'Insert argument after',
+ txtDeleteArg: 'Delete argument',
+ txtHideOpenBracket: 'Hide opening bracket',
+ txtShowOpenBracket: 'Show opening bracket',
+ txtHideCloseBracket: 'Hide closing bracket',
+ txtShowCloseBracket: 'Show closing bracket',
+ txtStretchBrackets: 'Stretch brackets',
+ txtMatchBrackets: 'Match brackets to argument height',
+ txtGroupCharOver: 'Char over text',
+ txtGroupCharUnder: 'Char under text',
+ txtDeleteGroupChar: 'Delete char',
+ txtHideDegree: 'Hide degree',
+ txtShowDegree: 'Show degree',
+ txtIncreaseArg: 'Increase argument size',
+ txtDecreaseArg: 'Decrease argument size',
+ txtInsertBreak: 'Insert manual break',
+ txtDeleteBreak: 'Delete manual break',
+ txtAlignToChar: 'Align to character',
+ txtDeleteRadical: 'Delete radical',
+ txtDeleteChars: 'Delete enclosing characters',
+ txtDeleteCharsAndSeparators: 'Delete enclosing characters and separators'
+
}, PE.Views.DocumentHolder || {}));
});
\ No newline at end of file
diff --git a/apps/presentationeditor/main/app/view/Toolbar.js b/apps/presentationeditor/main/app/view/Toolbar.js
index ee71a21b9..7f5cd4a58 100644
--- a/apps/presentationeditor/main/app/view/Toolbar.js
+++ b/apps/presentationeditor/main/app/view/Toolbar.js
@@ -80,7 +80,8 @@ define([
noObjectSelected: 'no-object',
disableOnStart: 'on-start',
cantPrint: 'cant-print',
- noTextSelected: 'no-text'
+ noTextSelected: 'no-text',
+ inEquation: 'in-equation'
};
PE.Views.Toolbar = Backbone.View.extend(_.extend({
@@ -297,7 +298,7 @@ define([
id : 'id-toolbar-btn-superscript',
cls : 'btn-toolbar',
iconCls : 'btn-superscript',
- lock : [_set.slideDeleted, _set.paragraphLock, _set.lostConnect, _set.noSlides, _set.noTextSelected, _set.shapeLock],
+ lock : [_set.slideDeleted, _set.paragraphLock, _set.lostConnect, _set.noSlides, _set.noTextSelected, _set.shapeLock, _set.inEquation],
enableToggle: true,
toggleGroup : 'superscriptGroup'
});
@@ -307,7 +308,7 @@ define([
id : 'id-toolbar-btn-subscript',
cls : 'btn-toolbar',
iconCls : 'btn-subscript',
- lock : [_set.slideDeleted, _set.paragraphLock, _set.lostConnect, _set.noSlides, _set.noTextSelected, _set.shapeLock],
+ lock : [_set.slideDeleted, _set.paragraphLock, _set.lostConnect, _set.noSlides, _set.noTextSelected, _set.shapeLock, _set.inEquation],
enableToggle: true,
toggleGroup : 'superscriptGroup'
});
@@ -632,6 +633,16 @@ define([
});
me.slideOnlyControls.push(me.btnInsertText);
+ this.btnInsertEquation = new Common.UI.Button({
+ id : 'id-toolbar-btn-insertequation',
+ cls : 'btn-toolbar',
+ iconCls : 'btn-insertequation',
+ lock : [_set.slideDeleted, _set.lostConnect, _set.noSlides, _set.disableOnStart],
+ split : true,
+ menu : new Common.UI.Menu({cls: 'menu-shapes'})
+ });
+ this.slideOnlyControls.push(this.btnInsertEquation);
+
me.btnInsertHyperlink = new Common.UI.Button({
id : 'id-toolbar-btn-inserthyperlink',
cls : 'btn-toolbar',
@@ -899,7 +910,7 @@ define([
this.btnSubscript, this.btnFontColor, this.btnClearStyle, this.btnCopyStyle, this.btnMarkers,
this.btnNumbers, this.btnDecLeftOffset, this.btnIncLeftOffset, this.btnLineSpace, this.btnHorizontalAlign,
this.btnVerticalAlign, this.btnShapeArrange, this.btnShapeAlign, this.btnInsertTable, this.btnInsertImage,
- this.btnInsertChart, this.btnInsertText,
+ this.btnInsertChart, this.btnInsertText, this.btnInsertEquation,
this.btnInsertHyperlink, this.btnInsertShape, this.btnColorSchemas, this.btnSlideSize, this.listTheme, this.mnuShowSettings
];
@@ -1034,6 +1045,7 @@ define([
replacePlacholder('#id-toolbar-' + prefix + '-placeholder-btn-align-shape', this.btnShapeAlign);
replacePlacholder('#id-toolbar-' + prefix + '-placeholder-btn-insertshape', this.btnInsertShape);
replacePlacholder('#id-toolbar-' + prefix + '-placeholder-btn-inserttext', this.btnInsertText);
+ replacePlacholder('#id-toolbar-' + prefix + '-placeholder-btn-insertequation', this.btnInsertEquation);
replacePlacholder('#id-toolbar-' + prefix + '-placeholder-btn-inserthyperlink',this.btnInsertHyperlink);
replacePlacholder('#id-toolbar-' + prefix + '-placeholder-btn-inserttable', this.btnInsertTable);
replacePlacholder('#id-toolbar-' + prefix + '-placeholder-btn-insertimage', this.btnInsertImage);
@@ -1080,6 +1092,7 @@ define([
this.btnInsertImage.updateHint(this.tipInsertImage);
this.btnInsertChart.updateHint(this.tipInsertChart);
this.btnInsertText.updateHint(this.tipInsertText);
+ this.btnInsertEquation.updateHint(this.tipInsertEquation);
this.btnInsertHyperlink.updateHint(this.tipInsertHyperlink + Common.Utils.String.platformKey('Ctrl+K'));
this.btnInsertShape.updateHint(this.tipInsertShape);
this.btnColorSchemas.updateHint(this.tipColorSchemas);
@@ -1397,6 +1410,10 @@ define([
if (me.listTheme.menuPicker.store.length > 0 && listStylesVisible){
me.listTheme.fillComboView(me.listTheme.menuPicker.getSelectedRec(), true);
}
+
+ if (me.btnInsertEquation.rendered)
+ PE.getController('Toolbar').fillEquations();
+
}, 100);
}
@@ -1694,6 +1711,7 @@ define([
textInsTextArt: 'Insert Text Art',
textShowBegin: 'Show from Beginning',
textShowCurrent: 'Show from Current slide',
- textShowSettings: 'Show Settings'
+ textShowSettings: 'Show Settings',
+ tipInsertEquation: 'Insert Equation'
}, PE.Views.Toolbar || {}));
});
\ No newline at end of file
diff --git a/apps/presentationeditor/main/locale/en.json b/apps/presentationeditor/main/locale/en.json
index 7f5687b99..a85d361a4 100644
--- a/apps/presentationeditor/main/locale/en.json
+++ b/apps/presentationeditor/main/locale/en.json
@@ -245,6 +245,334 @@
"PE.Controllers.Toolbar.textEmptyImgUrl": "You need to specify image URL.",
"PE.Controllers.Toolbar.textFontSizeErr": "The entered value is incorrect.
Please enter a numeric value between 1 and 100",
"PE.Controllers.Toolbar.textWarning": "Warning",
+ "PE.Controllers.Toolbar.textAccent": "Accents",
+ "PE.Controllers.Toolbar.textBracket": "Brackets",
+ "PE.Controllers.Toolbar.textFraction": "Fractions",
+ "PE.Controllers.Toolbar.textFunction": "Functions",
+ "PE.Controllers.Toolbar.textIntegral": "Integrals",
+ "PE.Controllers.Toolbar.textLargeOperator": "Large Operators",
+ "PE.Controllers.Toolbar.textLimitAndLog": "Limits And Logarithms",
+ "PE.Controllers.Toolbar.textMatrix": "Matrices",
+ "PE.Controllers.Toolbar.textOperator": "Operators",
+ "PE.Controllers.Toolbar.textRadical": "Radicals",
+ "PE.Controllers.Toolbar.textScript": "Scripts",
+ "PE.Controllers.Toolbar.textSymbols": "Symbols",
+ "PE.Controllers.Toolbar.txtAccent_Accent": "Acute",
+ "PE.Controllers.Toolbar.txtAccent_ArrowD": "Right-Left Arrow Above",
+ "PE.Controllers.Toolbar.txtAccent_ArrowL": "Leftwards Arrow Above",
+ "PE.Controllers.Toolbar.txtAccent_ArrowR": "Rightwards Arrow Above",
+ "PE.Controllers.Toolbar.txtAccent_Bar": "Bar",
+ "PE.Controllers.Toolbar.txtAccent_BarBot": "Underbar",
+ "PE.Controllers.Toolbar.txtAccent_BarTop": "Overbar",
+ "PE.Controllers.Toolbar.txtAccent_BorderBox": "Boxed Formula (With Placeholder)",
+ "PE.Controllers.Toolbar.txtAccent_BorderBoxCustom": "Boxed Formula(Example)",
+ "PE.Controllers.Toolbar.txtAccent_Check": "Check",
+ "PE.Controllers.Toolbar.txtAccent_CurveBracketBot": "Underbrace",
+ "PE.Controllers.Toolbar.txtAccent_CurveBracketTop": "Overbrace",
+ "PE.Controllers.Toolbar.txtAccent_Custom_1": "Vector A",
+ "PE.Controllers.Toolbar.txtAccent_Custom_2": "ABC With Overbar",
+ "PE.Controllers.Toolbar.txtAccent_Custom_3": "x XOR y With Overbar",
+ "PE.Controllers.Toolbar.txtAccent_DDDot": "Triple Dot",
+ "PE.Controllers.Toolbar.txtAccent_DDot": "Double Dot",
+ "PE.Controllers.Toolbar.txtAccent_Dot": "Dot",
+ "PE.Controllers.Toolbar.txtAccent_DoubleBar": "Double Overbar",
+ "PE.Controllers.Toolbar.txtAccent_Grave": "Grave",
+ "PE.Controllers.Toolbar.txtAccent_GroupBot": "Grouping Character Below",
+ "PE.Controllers.Toolbar.txtAccent_GroupTop": "Grouping Character Above",
+ "PE.Controllers.Toolbar.txtAccent_HarpoonL": "Leftwards Harpoon Above",
+ "PE.Controllers.Toolbar.txtAccent_HarpoonR": "Rightwards Harpoon Above",
+ "PE.Controllers.Toolbar.txtAccent_Hat": "Hat",
+ "PE.Controllers.Toolbar.txtAccent_Smile": "Breve",
+ "PE.Controllers.Toolbar.txtAccent_Tilde": "Tilde",
+ "PE.Controllers.Toolbar.txtBracket_Angle": "Brackets",
+ "PE.Controllers.Toolbar.txtBracket_Angle_Delimiter_2": "Brackets with Separators",
+ "PE.Controllers.Toolbar.txtBracket_Angle_Delimiter_3": "Brackets with Separators",
+ "PE.Controllers.Toolbar.txtBracket_Angle_NoneOpen": "Single Bracket",
+ "PE.Controllers.Toolbar.txtBracket_Angle_OpenNone": "Single Bracket",
+ "PE.Controllers.Toolbar.txtBracket_Curve": "Brackets",
+ "PE.Controllers.Toolbar.txtBracket_Curve_Delimiter_2": "Brackets with Separators",
+ "PE.Controllers.Toolbar.txtBracket_Curve_NoneOpen": "Single Bracket",
+ "PE.Controllers.Toolbar.txtBracket_Curve_OpenNone": "Single Bracket",
+ "PE.Controllers.Toolbar.txtBracket_Custom_1": "Cases (Two Conditions)",
+ "PE.Controllers.Toolbar.txtBracket_Custom_2": "Cases (Three Conditions)",
+ "PE.Controllers.Toolbar.txtBracket_Custom_3": "Stack Object",
+ "PE.Controllers.Toolbar.txtBracket_Custom_4": "Stack Object",
+ "PE.Controllers.Toolbar.txtBracket_Custom_5": "Cases Example",
+ "PE.Controllers.Toolbar.txtBracket_Custom_6": "Binomial Coefficient",
+ "PE.Controllers.Toolbar.txtBracket_Custom_7": "Binomial Coefficient",
+ "PE.Controllers.Toolbar.txtBracket_Line": "Brackets",
+ "PE.Controllers.Toolbar.txtBracket_Line_NoneOpen": "Single Bracket",
+ "PE.Controllers.Toolbar.txtBracket_Line_OpenNone": "Single Bracket",
+ "PE.Controllers.Toolbar.txtBracket_LineDouble": "Brackets",
+ "PE.Controllers.Toolbar.txtBracket_LineDouble_NoneOpen": "Single Bracket",
+ "PE.Controllers.Toolbar.txtBracket_LineDouble_OpenNone": "Single Bracket",
+ "PE.Controllers.Toolbar.txtBracket_LowLim": "Brackets",
+ "PE.Controllers.Toolbar.txtBracket_LowLim_NoneNone": "Single Bracket",
+ "PE.Controllers.Toolbar.txtBracket_LowLim_OpenNone": "Single Bracket",
+ "PE.Controllers.Toolbar.txtBracket_Round": "Brackets",
+ "PE.Controllers.Toolbar.txtBracket_Round_Delimiter_2": "Brackets with Separators",
+ "PE.Controllers.Toolbar.txtBracket_Round_NoneOpen": "Single Bracket",
+ "PE.Controllers.Toolbar.txtBracket_Round_OpenNone": "Single Bracket",
+ "PE.Controllers.Toolbar.txtBracket_Square": "Brackets",
+ "PE.Controllers.Toolbar.txtBracket_Square_CloseClose": "Brackets",
+ "PE.Controllers.Toolbar.txtBracket_Square_CloseOpen": "Brackets",
+ "PE.Controllers.Toolbar.txtBracket_Square_NoneOpen": "Single Bracket",
+ "PE.Controllers.Toolbar.txtBracket_Square_OpenNone": "Single Bracket",
+ "PE.Controllers.Toolbar.txtBracket_Square_OpenOpen": "Brackets",
+ "PE.Controllers.Toolbar.txtBracket_SquareDouble": "Brackets",
+ "PE.Controllers.Toolbar.txtBracket_SquareDouble_NoneOpen": "Single Bracket",
+ "PE.Controllers.Toolbar.txtBracket_SquareDouble_OpenNone": "Single Bracket",
+ "PE.Controllers.Toolbar.txtBracket_UppLim": "Brackets",
+ "PE.Controllers.Toolbar.txtBracket_UppLim_NoneOpen": "Single Bracket",
+ "PE.Controllers.Toolbar.txtBracket_UppLim_OpenNone": "Single Bracket",
+ "PE.Controllers.Toolbar.txtFractionDiagonal": "Skewed Fraction",
+ "PE.Controllers.Toolbar.txtFractionDifferential_1": "Differential",
+ "PE.Controllers.Toolbar.txtFractionDifferential_2": "Differential",
+ "PE.Controllers.Toolbar.txtFractionDifferential_3": "Differential",
+ "PE.Controllers.Toolbar.txtFractionDifferential_4": "Differential",
+ "PE.Controllers.Toolbar.txtFractionHorizontal": "Linear Fraction",
+ "PE.Controllers.Toolbar.txtFractionPi_2": "Pi Over 2",
+ "PE.Controllers.Toolbar.txtFractionSmall": "Small Fraction",
+ "PE.Controllers.Toolbar.txtFractionVertical": "Stacked Fraction",
+ "PE.Controllers.Toolbar.txtFunction_1_Cos": "Inverse Cosine Function",
+ "PE.Controllers.Toolbar.txtFunction_1_Cosh": "Hyperbolic Inverse Cosine Function",
+ "PE.Controllers.Toolbar.txtFunction_1_Cot": "Inverse Cotangent Function",
+ "PE.Controllers.Toolbar.txtFunction_1_Coth": "Hyperbolic Inverse Cotangent Function",
+ "PE.Controllers.Toolbar.txtFunction_1_Csc": "Inverse Cosecant Function",
+ "PE.Controllers.Toolbar.txtFunction_1_Csch": "Hyperbolic Inverse Cosecant Function",
+ "PE.Controllers.Toolbar.txtFunction_1_Sec": "Inverse Secant Function",
+ "PE.Controllers.Toolbar.txtFunction_1_Sech": "Hyperbolic Inverse Secant Function",
+ "PE.Controllers.Toolbar.txtFunction_1_Sin": "Inverse Sine Function",
+ "PE.Controllers.Toolbar.txtFunction_1_Sinh": "Hyperbolic Inverse Sine Function",
+ "PE.Controllers.Toolbar.txtFunction_1_Tan": "Inverse Tangent Function",
+ "PE.Controllers.Toolbar.txtFunction_1_Tanh": "Hyperbolic Inverse Tangent Function",
+ "PE.Controllers.Toolbar.txtFunction_Cos": "Cosine Function",
+ "PE.Controllers.Toolbar.txtFunction_Cosh": "Hyperbolic Cosine Function",
+ "PE.Controllers.Toolbar.txtFunction_Cot": "Cotangent Function",
+ "PE.Controllers.Toolbar.txtFunction_Coth": "Hyperbolic Cotangent Function",
+ "PE.Controllers.Toolbar.txtFunction_Csc": "Cosecant Function",
+ "PE.Controllers.Toolbar.txtFunction_Csch": "Hyperbolic Cosecant Function",
+ "PE.Controllers.Toolbar.txtFunction_Custom_1": "Sine theta",
+ "PE.Controllers.Toolbar.txtFunction_Custom_2": "Cos 2x",
+ "PE.Controllers.Toolbar.txtFunction_Custom_3": "Tangent formula",
+ "PE.Controllers.Toolbar.txtFunction_Sec": "Secant Function",
+ "PE.Controllers.Toolbar.txtFunction_Sech": "Hyperbolic Secant Function",
+ "PE.Controllers.Toolbar.txtFunction_Sin": "Sine Function",
+ "PE.Controllers.Toolbar.txtFunction_Sinh": "Hyperbolic Sine Function",
+ "PE.Controllers.Toolbar.txtFunction_Tan": "Tangent Function",
+ "PE.Controllers.Toolbar.txtFunction_Tanh": "Hyperbolic Tangent Function",
+ "PE.Controllers.Toolbar.txtIntegral": "Integral",
+ "PE.Controllers.Toolbar.txtIntegral_dtheta": "Differential theta",
+ "PE.Controllers.Toolbar.txtIntegral_dx": "Differential x",
+ "PE.Controllers.Toolbar.txtIntegral_dy": "Differential y",
+ "PE.Controllers.Toolbar.txtIntegralCenterSubSup": "Integral",
+ "PE.Controllers.Toolbar.txtIntegralDouble": "Double Integral",
+ "PE.Controllers.Toolbar.txtIntegralDoubleCenterSubSup": "Double Integral",
+ "PE.Controllers.Toolbar.txtIntegralDoubleSubSup": "Double Integral",
+ "PE.Controllers.Toolbar.txtIntegralOriented": "Contour Integral",
+ "PE.Controllers.Toolbar.txtIntegralOrientedCenterSubSup": "Contour Integral",
+ "PE.Controllers.Toolbar.txtIntegralOrientedDouble": "Surface Integral",
+ "PE.Controllers.Toolbar.txtIntegralOrientedDoubleCenterSubSup": "Surface Integral",
+ "PE.Controllers.Toolbar.txtIntegralOrientedDoubleSubSup": "Surface Integral",
+ "PE.Controllers.Toolbar.txtIntegralOrientedSubSup": "Contour Integral",
+ "PE.Controllers.Toolbar.txtIntegralOrientedTriple": "Volume Integral",
+ "PE.Controllers.Toolbar.txtIntegralOrientedTripleCenterSubSup": "Volume Integral",
+ "PE.Controllers.Toolbar.txtIntegralOrientedTripleSubSup": "Volume Integral",
+ "PE.Controllers.Toolbar.txtIntegralSubSup": "Integral",
+ "PE.Controllers.Toolbar.txtIntegralTriple": "Triple Integral",
+ "PE.Controllers.Toolbar.txtIntegralTripleCenterSubSup": "Triple Integral",
+ "PE.Controllers.Toolbar.txtIntegralTripleSubSup": "Triple Integral",
+ "PE.Controllers.Toolbar.txtLargeOperator_Conjunction": "Wedge",
+ "PE.Controllers.Toolbar.txtLargeOperator_Conjunction_CenterSub": "Wedge",
+ "PE.Controllers.Toolbar.txtLargeOperator_Conjunction_CenterSubSup": "Wedge",
+ "PE.Controllers.Toolbar.txtLargeOperator_Conjunction_Sub": "Wedge",
+ "PE.Controllers.Toolbar.txtLargeOperator_Conjunction_SubSup": "Wedge",
+ "PE.Controllers.Toolbar.txtLargeOperator_CoProd": "Co-Product",
+ "PE.Controllers.Toolbar.txtLargeOperator_CoProd_CenterSub": "Co-Product",
+ "PE.Controllers.Toolbar.txtLargeOperator_CoProd_CenterSubSup": "Co-Product",
+ "PE.Controllers.Toolbar.txtLargeOperator_CoProd_Sub": "Co-Product",
+ "PE.Controllers.Toolbar.txtLargeOperator_CoProd_SubSup": "Co-Product",
+ "PE.Controllers.Toolbar.txtLargeOperator_Custom_1": "Summation",
+ "PE.Controllers.Toolbar.txtLargeOperator_Custom_2": "Summation",
+ "PE.Controllers.Toolbar.txtLargeOperator_Custom_3": "Summation",
+ "PE.Controllers.Toolbar.txtLargeOperator_Custom_4": "Product",
+ "PE.Controllers.Toolbar.txtLargeOperator_Custom_5": "Union",
+ "PE.Controllers.Toolbar.txtLargeOperator_Disjunction": "Vee",
+ "PE.Controllers.Toolbar.txtLargeOperator_Disjunction_CenterSub": "Vee",
+ "PE.Controllers.Toolbar.txtLargeOperator_Disjunction_CenterSubSup": "Vee",
+ "PE.Controllers.Toolbar.txtLargeOperator_Disjunction_Sub": "Vee",
+ "PE.Controllers.Toolbar.txtLargeOperator_Disjunction_SubSup": "Vee",
+ "PE.Controllers.Toolbar.txtLargeOperator_Intersection": "Intersection",
+ "PE.Controllers.Toolbar.txtLargeOperator_Intersection_CenterSub": "Intersection",
+ "PE.Controllers.Toolbar.txtLargeOperator_Intersection_CenterSubSup": "Intersection",
+ "PE.Controllers.Toolbar.txtLargeOperator_Intersection_Sub": "Intersection",
+ "PE.Controllers.Toolbar.txtLargeOperator_Intersection_SubSup": "Intersection",
+ "PE.Controllers.Toolbar.txtLargeOperator_Prod": "Product",
+ "PE.Controllers.Toolbar.txtLargeOperator_Prod_CenterSub": "Product",
+ "PE.Controllers.Toolbar.txtLargeOperator_Prod_CenterSubSup": "Product",
+ "PE.Controllers.Toolbar.txtLargeOperator_Prod_Sub": "Product",
+ "PE.Controllers.Toolbar.txtLargeOperator_Prod_SubSup": "Product",
+ "PE.Controllers.Toolbar.txtLargeOperator_Sum": "Summation",
+ "PE.Controllers.Toolbar.txtLargeOperator_Sum_CenterSub": "Summation",
+ "PE.Controllers.Toolbar.txtLargeOperator_Sum_CenterSubSup": "Summation",
+ "PE.Controllers.Toolbar.txtLargeOperator_Sum_Sub": "Summation",
+ "PE.Controllers.Toolbar.txtLargeOperator_Sum_SubSup": "Summation",
+ "PE.Controllers.Toolbar.txtLargeOperator_Union": "Union",
+ "PE.Controllers.Toolbar.txtLargeOperator_Union_CenterSub": "Union",
+ "PE.Controllers.Toolbar.txtLargeOperator_Union_CenterSubSup": "Union",
+ "PE.Controllers.Toolbar.txtLargeOperator_Union_Sub": "Union",
+ "PE.Controllers.Toolbar.txtLargeOperator_Union_SubSup": "Union",
+ "PE.Controllers.Toolbar.txtLimitLog_Custom_1": "Limit Example",
+ "PE.Controllers.Toolbar.txtLimitLog_Custom_2": "Maximum Example",
+ "PE.Controllers.Toolbar.txtLimitLog_Lim": "Limit",
+ "PE.Controllers.Toolbar.txtLimitLog_Ln": "Natural Logarithm",
+ "PE.Controllers.Toolbar.txtLimitLog_Log": "Logarithm",
+ "PE.Controllers.Toolbar.txtLimitLog_LogBase": "Logarithm",
+ "PE.Controllers.Toolbar.txtLimitLog_Max": "Maximum",
+ "PE.Controllers.Toolbar.txtLimitLog_Min": "Minimum",
+ "PE.Controllers.Toolbar.txtMatrix_1_2": "1x2 Empty Matrix",
+ "PE.Controllers.Toolbar.txtMatrix_1_3": "1x3 Empty Matrix",
+ "PE.Controllers.Toolbar.txtMatrix_2_1": "2x1 Empty Matrix",
+ "PE.Controllers.Toolbar.txtMatrix_2_2": "2x2 Empty Matrix",
+ "PE.Controllers.Toolbar.txtMatrix_2_2_DLineBracket": "Empty Matrix with Brackets",
+ "PE.Controllers.Toolbar.txtMatrix_2_2_LineBracket": "Empty Matrix with Brackets",
+ "PE.Controllers.Toolbar.txtMatrix_2_2_RoundBracket": "Empty Matrix with Brackets",
+ "PE.Controllers.Toolbar.txtMatrix_2_2_SquareBracket": "Empty Matrix with Brackets",
+ "PE.Controllers.Toolbar.txtMatrix_2_3": "2x3 Empty Matrix",
+ "PE.Controllers.Toolbar.txtMatrix_3_1": "3x1 Empty Matrix",
+ "PE.Controllers.Toolbar.txtMatrix_3_2": "3x2 Empty Matrix",
+ "PE.Controllers.Toolbar.txtMatrix_3_3": "3x3 Empty Matrix",
+ "PE.Controllers.Toolbar.txtMatrix_Dots_Baseline": "Baseline Dots",
+ "PE.Controllers.Toolbar.txtMatrix_Dots_Center": "Midline Dots",
+ "PE.Controllers.Toolbar.txtMatrix_Dots_Diagonal": "Diagonal Dots",
+ "PE.Controllers.Toolbar.txtMatrix_Dots_Vertical": "Vertical Dots",
+ "PE.Controllers.Toolbar.txtMatrix_Flat_Round": "Sparse Matrix",
+ "PE.Controllers.Toolbar.txtMatrix_Flat_Square": "Sparse Matrix",
+ "PE.Controllers.Toolbar.txtMatrix_Identity_2": "2x2 Identity Matrix",
+ "PE.Controllers.Toolbar.txtMatrix_Identity_2_NoZeros": "3x3 Identity Matrix",
+ "PE.Controllers.Toolbar.txtMatrix_Identity_3": "3x3 Identity Matrix",
+ "PE.Controllers.Toolbar.txtMatrix_Identity_3_NoZeros": "3x3 Identity Matrix",
+ "PE.Controllers.Toolbar.txtOperator_ArrowD_Bot": "Right-Left Arrow Below",
+ "PE.Controllers.Toolbar.txtOperator_ArrowD_Top": "Right-Left Arrow Above",
+ "PE.Controllers.Toolbar.txtOperator_ArrowL_Bot": "Leftwards Arrow Below",
+ "PE.Controllers.Toolbar.txtOperator_ArrowL_Top": "Leftwards Arrow Above",
+ "PE.Controllers.Toolbar.txtOperator_ArrowR_Bot": "Rightwards Arrow Below",
+ "PE.Controllers.Toolbar.txtOperator_ArrowR_Top": "Rightwards Arrow Above",
+ "PE.Controllers.Toolbar.txtOperator_ColonEquals": "Colon Equal",
+ "PE.Controllers.Toolbar.txtOperator_Custom_1": "Yields",
+ "PE.Controllers.Toolbar.txtOperator_Custom_2": "Delta Yields",
+ "PE.Controllers.Toolbar.txtOperator_Definition": "Equal to By Definition",
+ "PE.Controllers.Toolbar.txtOperator_DeltaEquals": "Delta Equal To",
+ "PE.Controllers.Toolbar.txtOperator_DoubleArrowD_Bot": "Right-Left Arrow Below",
+ "PE.Controllers.Toolbar.txtOperator_DoubleArrowD_Top": "Right-Left Arrow Above",
+ "PE.Controllers.Toolbar.txtOperator_DoubleArrowL_Bot": "Leftwards Arrow Below",
+ "PE.Controllers.Toolbar.txtOperator_DoubleArrowL_Top": "Leftwards Arrow Above",
+ "PE.Controllers.Toolbar.txtOperator_DoubleArrowR_Bot": "Rightwards Arrow Below",
+ "PE.Controllers.Toolbar.txtOperator_DoubleArrowR_Top": "Rightwards Arrow Above",
+ "PE.Controllers.Toolbar.txtOperator_EqualsEquals": "Equal Equal",
+ "PE.Controllers.Toolbar.txtOperator_MinusEquals": "Minus Equal",
+ "PE.Controllers.Toolbar.txtOperator_PlusEquals": "Plus Equal",
+ "PE.Controllers.Toolbar.txtOperator_UnitOfMeasure": "Measured By",
+ "PE.Controllers.Toolbar.txtRadicalCustom_1": "Radical",
+ "PE.Controllers.Toolbar.txtRadicalCustom_2": "Radical",
+ "PE.Controllers.Toolbar.txtRadicalRoot_2": "Square Root With Degree",
+ "PE.Controllers.Toolbar.txtRadicalRoot_3": "Cubic Root",
+ "PE.Controllers.Toolbar.txtRadicalRoot_n": "Radical With Degree",
+ "PE.Controllers.Toolbar.txtRadicalSqrt": "Square Root",
+ "PE.Controllers.Toolbar.txtScriptCustom_1": "Script",
+ "PE.Controllers.Toolbar.txtScriptCustom_2": "Script",
+ "PE.Controllers.Toolbar.txtScriptCustom_3": "Script",
+ "PE.Controllers.Toolbar.txtScriptCustom_4": "Script",
+ "PE.Controllers.Toolbar.txtScriptSub": "Subscript",
+ "PE.Controllers.Toolbar.txtScriptSubSup": "Subscript-Superscript",
+ "PE.Controllers.Toolbar.txtScriptSubSupLeft": "LeftSubscript-Superscript",
+ "PE.Controllers.Toolbar.txtScriptSup": "Superscript",
+ "PE.Controllers.Toolbar.txtSymbol_about": "Approximately",
+ "PE.Controllers.Toolbar.txtSymbol_additional": "Complement",
+ "PE.Controllers.Toolbar.txtSymbol_aleph": "Alef",
+ "PE.Controllers.Toolbar.txtSymbol_alpha": "Alpha",
+ "PE.Controllers.Toolbar.txtSymbol_approx": "Almost Equal To",
+ "PE.Controllers.Toolbar.txtSymbol_ast": "Asterisk Operator",
+ "PE.Controllers.Toolbar.txtSymbol_beta": "Beta",
+ "PE.Controllers.Toolbar.txtSymbol_beth": "Bet",
+ "PE.Controllers.Toolbar.txtSymbol_bullet": "Bullet Operator",
+ "PE.Controllers.Toolbar.txtSymbol_cap": "Intersection",
+ "PE.Controllers.Toolbar.txtSymbol_cbrt": "Cube Root",
+ "PE.Controllers.Toolbar.txtSymbol_cdots": "Midline Horizontal Ellipsis",
+ "PE.Controllers.Toolbar.txtSymbol_celsius": "Degrees Celsius",
+ "PE.Controllers.Toolbar.txtSymbol_chi": "Chi",
+ "PE.Controllers.Toolbar.txtSymbol_cong": "Approximately Equal To",
+ "PE.Controllers.Toolbar.txtSymbol_cup": "Union",
+ "PE.Controllers.Toolbar.txtSymbol_ddots": "Down Right Diagonal Ellipsis",
+ "PE.Controllers.Toolbar.txtSymbol_degree": "Degrees",
+ "PE.Controllers.Toolbar.txtSymbol_delta": "Delta",
+ "PE.Controllers.Toolbar.txtSymbol_div": "Division Sign",
+ "PE.Controllers.Toolbar.txtSymbol_downarrow": "Down Arrow",
+ "PE.Controllers.Toolbar.txtSymbol_emptyset": "Empty Set",
+ "PE.Controllers.Toolbar.txtSymbol_epsilon": "Epsilon",
+ "PE.Controllers.Toolbar.txtSymbol_equals": "Equal",
+ "PE.Controllers.Toolbar.txtSymbol_equiv": "Identical To",
+ "PE.Controllers.Toolbar.txtSymbol_eta": "Eta",
+ "PE.Controllers.Toolbar.txtSymbol_exists": "There Exist",
+ "PE.Controllers.Toolbar.txtSymbol_factorial": "Factorial",
+ "PE.Controllers.Toolbar.txtSymbol_fahrenheit": "Degrees Fahrenheit",
+ "PE.Controllers.Toolbar.txtSymbol_forall": "For All",
+ "PE.Controllers.Toolbar.txtSymbol_gamma": "Gamma",
+ "PE.Controllers.Toolbar.txtSymbol_geq": "Greater Than or Equal To",
+ "PE.Controllers.Toolbar.txtSymbol_gg": "Much Greater Than",
+ "PE.Controllers.Toolbar.txtSymbol_greater": "Greater Than",
+ "PE.Controllers.Toolbar.txtSymbol_in": "Element Of",
+ "PE.Controllers.Toolbar.txtSymbol_inc": "Increment",
+ "PE.Controllers.Toolbar.txtSymbol_infinity": "Infinity",
+ "PE.Controllers.Toolbar.txtSymbol_iota": "Iota",
+ "PE.Controllers.Toolbar.txtSymbol_kappa": "Kappa",
+ "PE.Controllers.Toolbar.txtSymbol_lambda": "Lambda",
+ "PE.Controllers.Toolbar.txtSymbol_leftarrow": "Left Arrow",
+ "PE.Controllers.Toolbar.txtSymbol_leftrightarrow": "Left-Right Arrow",
+ "PE.Controllers.Toolbar.txtSymbol_leq": "Less Than or Equal To",
+ "PE.Controllers.Toolbar.txtSymbol_less": "Less Than",
+ "PE.Controllers.Toolbar.txtSymbol_ll": "Much Less Than",
+ "PE.Controllers.Toolbar.txtSymbol_minus": "Minus",
+ "PE.Controllers.Toolbar.txtSymbol_mp": "Minus Plus",
+ "PE.Controllers.Toolbar.txtSymbol_mu": "Mu",
+ "PE.Controllers.Toolbar.txtSymbol_nabla": "Nabla",
+ "PE.Controllers.Toolbar.txtSymbol_neq": "Not Equal To",
+ "PE.Controllers.Toolbar.txtSymbol_ni": "Contains as Member",
+ "PE.Controllers.Toolbar.txtSymbol_not": "Not Sign",
+ "PE.Controllers.Toolbar.txtSymbol_notexists": "There Does Not Exist",
+ "PE.Controllers.Toolbar.txtSymbol_nu": "Nu",
+ "PE.Controllers.Toolbar.txtSymbol_o": "Omicron",
+ "PE.Controllers.Toolbar.txtSymbol_omega": "Omega",
+ "PE.Controllers.Toolbar.txtSymbol_partial": "Partial Differential",
+ "PE.Controllers.Toolbar.txtSymbol_percent": "Percentage",
+ "PE.Controllers.Toolbar.txtSymbol_phi": "Phi",
+ "PE.Controllers.Toolbar.txtSymbol_pi": "Pi",
+ "PE.Controllers.Toolbar.txtSymbol_plus": "Plus",
+ "PE.Controllers.Toolbar.txtSymbol_pm": "Plus Minus",
+ "PE.Controllers.Toolbar.txtSymbol_propto": "Proportional To",
+ "PE.Controllers.Toolbar.txtSymbol_psi": "Psi",
+ "PE.Controllers.Toolbar.txtSymbol_qdrt": "Fourth Root",
+ "PE.Controllers.Toolbar.txtSymbol_qed": "End of Proof",
+ "PE.Controllers.Toolbar.txtSymbol_rddots": "Up Right Diagonal Ellipsis",
+ "PE.Controllers.Toolbar.txtSymbol_rho": "Rho",
+ "PE.Controllers.Toolbar.txtSymbol_rightarrow": "Right Arrow",
+ "PE.Controllers.Toolbar.txtSymbol_sigma": "Sigma",
+ "PE.Controllers.Toolbar.txtSymbol_sqrt": "Radical Sign",
+ "PE.Controllers.Toolbar.txtSymbol_tau": "Tau",
+ "PE.Controllers.Toolbar.txtSymbol_therefore": "Therefore",
+ "PE.Controllers.Toolbar.txtSymbol_theta": "Theta",
+ "PE.Controllers.Toolbar.txtSymbol_times": "Multiplication Sign",
+ "PE.Controllers.Toolbar.txtSymbol_uparrow": "Up Arrow",
+ "PE.Controllers.Toolbar.txtSymbol_upsilon": "Upsilon",
+ "PE.Controllers.Toolbar.txtSymbol_varepsilon": "Epsilon Variant",
+ "PE.Controllers.Toolbar.txtSymbol_varphi": "Phi Variant",
+ "PE.Controllers.Toolbar.txtSymbol_varpi": "Pi Variant",
+ "PE.Controllers.Toolbar.txtSymbol_varrho": "Rho Variant",
+ "PE.Controllers.Toolbar.txtSymbol_varsigma": "Sigma Variant",
+ "PE.Controllers.Toolbar.txtSymbol_vartheta": "Theta Variant",
+ "PE.Controllers.Toolbar.txtSymbol_vdots": "Vertical Ellipsis",
+ "PE.Controllers.Toolbar.txtSymbol_xsi": "Xi",
+ "PE.Controllers.Toolbar.txtSymbol_zeta": "Zeta",
"PE.Views.ChartSettings.textArea": "Area Chart",
"PE.Views.ChartSettings.textBar": "Bar Chart",
"PE.Views.ChartSettings.textChartType": "Change Chart Type",
@@ -331,6 +659,76 @@
"PE.Views.DocumentHolder.txtSlide": "Slide",
"PE.Views.DocumentHolder.txtUngroup": "Ungroup",
"PE.Views.DocumentHolder.vertAlignText": "Vertical Alignment",
+ "PE.Views.DocumentHolder.txtRemoveAccentChar": "Remove accent character",
+ "PE.Views.DocumentHolder.txtBorderProps": "Borders property",
+ "PE.Views.DocumentHolder.txtHideTop": "Hide top border",
+ "PE.Views.DocumentHolder.txtHideBottom": "Hide bottom border",
+ "PE.Views.DocumentHolder.txtHideLeft": "Hide left border",
+ "PE.Views.DocumentHolder.txtHideRight": "Hide right border",
+ "PE.Views.DocumentHolder.txtHideHor": "Hide horizontal line",
+ "PE.Views.DocumentHolder.txtHideVer": "Hide vertical line",
+ "PE.Views.DocumentHolder.txtHideLT": "Hide left top line",
+ "PE.Views.DocumentHolder.txtHideLB": "Hide left bottom line",
+ "PE.Views.DocumentHolder.txtAddTop": "Add top border",
+ "PE.Views.DocumentHolder.txtAddBottom": "Add bottom border",
+ "PE.Views.DocumentHolder.txtAddLeft": "Add left border",
+ "PE.Views.DocumentHolder.txtAddRight": "Add right border",
+ "PE.Views.DocumentHolder.txtAddHor": "Add horizontal line",
+ "PE.Views.DocumentHolder.txtAddVer": "Add vertical line",
+ "PE.Views.DocumentHolder.txtAddLT": "Add left top line",
+ "PE.Views.DocumentHolder.txtAddLB": "Add left bottom line",
+ "PE.Views.DocumentHolder.txtRemoveBar": "Remove bar",
+ "PE.Views.DocumentHolder.txtOverbar": "Bar over text",
+ "PE.Views.DocumentHolder.txtUnderbar": "Bar under text",
+ "PE.Views.DocumentHolder.txtRemScripts": "Remove scripts",
+ "PE.Views.DocumentHolder.txtRemSubscript": "Remove subscript",
+ "PE.Views.DocumentHolder.txtRemSuperscript": "Remove superscript",
+ "PE.Views.DocumentHolder.txtScriptsAfter": "Scripts after text",
+ "PE.Views.DocumentHolder.txtScriptsBefore": "Scripts before text",
+ "PE.Views.DocumentHolder.txtFractionStacked": "Change to stacked fraction",
+ "PE.Views.DocumentHolder.txtFractionSkewed": "Change to skewed fraction",
+ "PE.Views.DocumentHolder.txtFractionLinear": "Change to linear fraction",
+ "PE.Views.DocumentHolder.txtRemFractionBar": "Remove fraction bar",
+ "PE.Views.DocumentHolder.txtAddFractionBar": "Add fraction bar",
+ "PE.Views.DocumentHolder.txtRemLimit": "Remove limit",
+ "PE.Views.DocumentHolder.txtLimitOver": "Limit over text",
+ "PE.Views.DocumentHolder.txtLimitUnder": "Limit under text",
+ "PE.Views.DocumentHolder.txtHidePlaceholder": "Hide placeholder",
+ "PE.Views.DocumentHolder.txtShowPlaceholder": "Show placeholder",
+ "PE.Views.DocumentHolder.txtMatrixAlign": "Matrix alignment",
+ "PE.Views.DocumentHolder.txtColumnAlign": "Column alignment",
+ "PE.Views.DocumentHolder.txtTop": "Top",
+ "PE.Views.DocumentHolder.txtBottom": "Bottom",
+ "PE.Views.DocumentHolder.txtInsertEqBefore": "Insert equation before",
+ "PE.Views.DocumentHolder.txtInsertEqAfter": "Insert equation after",
+ "PE.Views.DocumentHolder.txtDeleteEq": "Delete equation",
+ "PE.Views.DocumentHolder.txtLimitChange": "Change limits location",
+ "PE.Views.DocumentHolder.txtHideTopLimit": "Hide top limit",
+ "PE.Views.DocumentHolder.txtShowTopLimit": "Show top limit",
+ "PE.Views.DocumentHolder.txtHideBottomLimit": "Hide bottom limit",
+ "PE.Views.DocumentHolder.txtShowBottomLimit": "Show bottom limit",
+ "PE.Views.DocumentHolder.txtInsertArgBefore": "Insert argument before",
+ "PE.Views.DocumentHolder.txtInsertArgAfter": "Insert argument after",
+ "PE.Views.DocumentHolder.txtDeleteArg": "Delete argument",
+ "PE.Views.DocumentHolder.txtHideOpenBracket": "Hide opening bracket",
+ "PE.Views.DocumentHolder.txtShowOpenBracket": "Show opening bracket",
+ "PE.Views.DocumentHolder.txtHideCloseBracket": "Hide closing bracket",
+ "PE.Views.DocumentHolder.txtShowCloseBracket": "Show closing bracket",
+ "PE.Views.DocumentHolder.txtStretchBrackets": "Stretch brackets",
+ "PE.Views.DocumentHolder.txtMatchBrackets": "Match brackets to argument height",
+ "PE.Views.DocumentHolder.txtGroupCharOver": "Char over text",
+ "PE.Views.DocumentHolder.txtGroupCharUnder": "Char under text",
+ "PE.Views.DocumentHolder.txtDeleteGroupChar": "Delete char",
+ "PE.Views.DocumentHolder.txtHideDegree": "Hide degree",
+ "PE.Views.DocumentHolder.txtShowDegree": "Show degree",
+ "PE.Views.DocumentHolder.txtIncreaseArg": "Increase argument size",
+ "PE.Views.DocumentHolder.txtDecreaseArg": "Decrease argument size",
+ "PE.Views.DocumentHolder.txtInsertBreak": "Insert manual break",
+ "PE.Views.DocumentHolder.txtDeleteBreak": "Delete manual break",
+ "PE.Views.DocumentHolder.txtAlignToChar": "Align to character",
+ "PE.Views.DocumentHolder.txtDeleteRadical": "Delete radical",
+ "PE.Views.DocumentHolder.txtDeleteChars": "Delete enclosing characters",
+ "PE.Views.DocumentHolder.txtDeleteCharsAndSeparators": "Delete enclosing characters and separators",
"PE.Views.DocumentPreview.goToSlideText": "Go to Slide",
"PE.Views.DocumentPreview.slideIndexText": "Slide {0} of {1}",
"PE.Views.DocumentPreview.txtClose": "Close Slideshow",
@@ -838,6 +1236,7 @@
"PE.Views.Toolbar.tipHideBars": "Hide Title bar & Status bar",
"PE.Views.Toolbar.tipIncPrLeft": "Increase Indent",
"PE.Views.Toolbar.tipInsertChart": "Insert Chart",
+ "PE.Views.Toolbar.tipInsertEquation": "Insert Equation",
"PE.Views.Toolbar.tipInsertHyperlink": "Add Hyperlink",
"PE.Views.Toolbar.tipInsertImage": "Insert Picture",
"PE.Views.Toolbar.tipInsertShape": "Insert Autoshape",
diff --git a/apps/presentationeditor/main/resources/img/toolbar/math.png b/apps/presentationeditor/main/resources/img/toolbar/math.png
new file mode 100644
index 000000000..173efd6f9
Binary files /dev/null and b/apps/presentationeditor/main/resources/img/toolbar/math.png differ
diff --git a/apps/presentationeditor/main/resources/img/toolbar/math@2x.png b/apps/presentationeditor/main/resources/img/toolbar/math@2x.png
new file mode 100644
index 000000000..c3ca01890
Binary files /dev/null and b/apps/presentationeditor/main/resources/img/toolbar/math@2x.png differ
diff --git a/apps/presentationeditor/main/resources/less/toolbar.less b/apps/presentationeditor/main/resources/less/toolbar.less
index a9c16d6ca..83235f262 100644
--- a/apps/presentationeditor/main/resources/less/toolbar.less
+++ b/apps/presentationeditor/main/resources/less/toolbar.less
@@ -344,6 +344,7 @@
.toolbar-btn-icon(btn-zoomin, 61, @toolbar-icon-size);
.toolbar-btn-icon(btn-zoomout, 60, @toolbar-icon-size);
.toolbar-btn-icon(btn-save-coauth, 69, @toolbar-icon-size);
+.toolbar-btn-icon(btn-insertequation, 74, @toolbar-icon-size);
// add slide
.btn-toolbar .btn-addslide {background-position: 0 -120px;}
@@ -393,4 +394,9 @@
color: #ffffff;
font: 11px arial;
white-space: nowrap;
+}
+
+.item-equation {
+ border: 1px solid @gray;
+ .background-ximage('@{app-image-path}/toolbar/math.png', '@{app-image-path}/toolbar/math@2x.png', 1500px);
}
\ No newline at end of file
diff --git a/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js b/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js
index 86daf0dd9..4feddd629 100644
--- a/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js
+++ b/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js
@@ -78,6 +78,8 @@ define([
me.popupmenu = false;
me.rangeSelectionMode = false;
me.namedrange_locked = false;
+ me._currentMathObj = undefined;
+ me._currentParaObjDisabled = false;
/** coauthoring begin **/
this.wrapEvents = {
@@ -1195,7 +1197,8 @@ define([
documentHolder.pmiTextAdvanced.textInfo = undefined;
- var selectedObjects = this.api.asc_getGraphicObjectProps();
+ var selectedObjects = this.api.asc_getGraphicObjectProps(),
+ isEquation = false;
for (var i = 0; i < selectedObjects.length; i++) {
var elType = selectedObjects[i].asc_getObjectType();
@@ -1214,6 +1217,9 @@ define([
} else if (elType == Asc.c_oAscTypeSelectElement.Paragraph) {
documentHolder.pmiTextAdvanced.textInfo = selectedObjects[i].asc_getObjectValue();
isObjLocked = isObjLocked || documentHolder.pmiTextAdvanced.textInfo.asc_getLocked();
+ } else if (elType == Asc.c_oAscTypeSelectElement.Math) {
+ this._currentMathObj = selectedObjects[i].asc_getObjectValue();
+ isEquation = true;
}
}
@@ -1222,17 +1228,27 @@ define([
documentHolder.menuHyperlinkShape.setVisible(istextshapemenu && can_add_hyperlink!==false && hyperinfo);
documentHolder.menuAddHyperlinkShape.setVisible(istextshapemenu && can_add_hyperlink!==false && !hyperinfo);
- documentHolder.menuParagraphVAlign.setVisible(istextchartmenu!==true); // убрать после того, как заголовок можно будет растягивать по вертикали!!
- documentHolder.menuParagraphDirection.setVisible(istextchartmenu!==true); // убрать после того, как заголовок можно будет растягивать по вертикали!!
+ documentHolder.menuParagraphVAlign.setVisible(istextchartmenu!==true && !isEquation); // убрать после того, как заголовок можно будет растягивать по вертикали!!
+ documentHolder.menuParagraphDirection.setVisible(istextchartmenu!==true && !isEquation); // убрать после того, как заголовок можно будет растягивать по вертикали!!
documentHolder.pmiTextAdvanced.setVisible(documentHolder.pmiTextAdvanced.textInfo!==undefined);
+
_.each(documentHolder.textInShapeMenu.items, function(item) {
item.setDisabled(isObjLocked);
});
documentHolder.pmiTextCopy.setDisabled(false);
+
+ //equation menu
+ var eqlen = 0;
+ this._currentParaObjDisabled = isObjLocked;
+ if (isEquation) {
+ eqlen = this.addEquationMenu(4);
+ } else
+ this.clearEquationMenu(4);
+
if (showMenu) this.showPopupMenu(documentHolder.textInShapeMenu, {}, event);
documentHolder.textInShapeMenu.items[3].setVisible( documentHolder.menuHyperlinkShape.isVisible() ||
documentHolder.menuAddHyperlinkShape.isVisible() ||
- documentHolder.menuParagraphVAlign.isVisible());
+ documentHolder.menuParagraphVAlign.isVisible() || isEquation);
} else if (!this.permissions.isEditMailMerge && !this.permissions.isEditDiagram || (seltype !== Asc.c_oAscSelectionType.RangeImage && seltype !== Asc.c_oAscSelectionType.RangeShape &&
seltype !== Asc.c_oAscSelectionType.RangeChart && seltype !== Asc.c_oAscSelectionType.RangeChartText && seltype !== Asc.c_oAscSelectionType.RangeShapeText)) {
if (!showMenu && !documentHolder.ssMenu.isVisible()) return;
@@ -1544,6 +1560,624 @@ define([
this.namedrange_locked = (state == Asc.c_oAscDefinedNameReason.LockDefNameManager);
},
+ initEquationMenu: function() {
+ if (!this._currentMathObj) return;
+ var me = this,
+ type = me._currentMathObj.get_Type(),
+ value = me._currentMathObj,
+ mnu, arr = [];
+
+ switch (type) {
+ case Asc.c_oAscMathInterfaceType.Accent:
+ mnu = new Common.UI.MenuItem({
+ caption : me.txtRemoveAccentChar,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ equationProps: {type: type, callback: 'remove_AccentCharacter'}
+ });
+ arr.push(mnu);
+ break;
+ case Asc.c_oAscMathInterfaceType.BorderBox:
+ mnu = new Common.UI.MenuItem({
+ caption : me.txtBorderProps,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ menu : new Common.UI.Menu({
+ menuAlign: 'tl-tr',
+ items : [
+ {
+ caption: value.get_HideTop() ? me.txtAddTop : me.txtHideTop,
+ equationProps: {type: type, callback: 'put_HideTop', value: !value.get_HideTop()}
+ },
+ {
+ caption: value.get_HideBottom() ? me.txtAddBottom : me.txtHideBottom,
+ equationProps: {type: type, callback: 'put_HideBottom', value: !value.get_HideBottom()}
+ },
+ {
+ caption: value.get_HideLeft() ? me.txtAddLeft : me.txtHideLeft,
+ equationProps: {type: type, callback: 'put_HideLeft', value: !value.get_HideLeft()}
+ },
+ {
+ caption: value.get_HideRight() ? me.txtAddRight : me.txtHideRight,
+ equationProps: {type: type, callback: 'put_HideRight', value: !value.get_HideRight()}
+ },
+ {
+ caption: value.get_HideHor() ? me.txtAddHor : me.txtHideHor,
+ equationProps: {type: type, callback: 'put_HideHor', value: !value.get_HideHor()}
+ },
+ {
+ caption: value.get_HideVer() ? me.txtAddVer : me.txtHideVer,
+ equationProps: {type: type, callback: 'put_HideVer', value: !value.get_HideVer()}
+ },
+ {
+ caption: value.get_HideTopLTR() ? me.txtAddLT : me.txtHideLT,
+ equationProps: {type: type, callback: 'put_HideTopLTR', value: !value.get_HideTopLTR()}
+ },
+ {
+ caption: value.get_HideTopRTL() ? me.txtAddLB : me.txtHideLB,
+ equationProps: {type: type, callback: 'put_HideTopRTL', value: !value.get_HideTopRTL()}
+ }
+ ]
+ })
+ });
+ arr.push(mnu);
+ break;
+ case Asc.c_oAscMathInterfaceType.Bar:
+ mnu = new Common.UI.MenuItem({
+ caption : me.txtRemoveBar,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ equationProps: {type: type, callback: 'remove_Bar'}
+ });
+ arr.push(mnu);
+ mnu = new Common.UI.MenuItem({
+ caption : (value.get_Pos()==Asc.c_oAscMathInterfaceBarPos.Top) ? me.txtUnderbar : me.txtOverbar,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ equationProps: {type: type, callback: 'put_Pos', value: (value.get_Pos()==Asc.c_oAscMathInterfaceBarPos.Top) ? Asc.c_oAscMathInterfaceBarPos.Bottom : Asc.c_oAscMathInterfaceBarPos.Top}
+ });
+ arr.push(mnu);
+ break;
+ case Asc.c_oAscMathInterfaceType.Script:
+ var scripttype = value.get_ScriptType();
+ if (scripttype == Asc.c_oAscMathInterfaceScript.PreSubSup) {
+ mnu = new Common.UI.MenuItem({
+ caption : me.txtScriptsAfter,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ equationProps: {type: type, callback: 'put_ScriptType', value: Asc.c_oAscMathInterfaceScript.SubSup}
+ });
+ arr.push(mnu);
+ mnu = new Common.UI.MenuItem({
+ caption : me.txtRemScripts,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ equationProps: {type: type, callback: 'put_ScriptType', value: Asc.c_oAscMathInterfaceScript.None}
+ });
+ arr.push(mnu);
+ } else {
+ if (scripttype == Asc.c_oAscMathInterfaceScript.SubSup) {
+ mnu = new Common.UI.MenuItem({
+ caption : me.txtScriptsBefore,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ equationProps: {type: type, callback: 'put_ScriptType', value: Asc.c_oAscMathInterfaceScript.PreSubSup}
+ });
+ arr.push(mnu);
+ }
+ if (scripttype == Asc.c_oAscMathInterfaceScript.SubSup || scripttype == Asc.c_oAscMathInterfaceScript.Sub ) {
+ mnu = new Common.UI.MenuItem({
+ caption : me.txtRemSubscript,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ equationProps: {type: type, callback: 'put_ScriptType', value: (scripttype == Asc.c_oAscMathInterfaceScript.SubSup) ? Asc.c_oAscMathInterfaceScript.Sup : Asc.c_oAscMathInterfaceScript.None }
+ });
+ arr.push(mnu);
+ }
+ if (scripttype == Asc.c_oAscMathInterfaceScript.SubSup || scripttype == Asc.c_oAscMathInterfaceScript.Sup ) {
+ mnu = new Common.UI.MenuItem({
+ caption : me.txtRemSuperscript,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ equationProps: {type: type, callback: 'put_ScriptType', value: (scripttype == Asc.c_oAscMathInterfaceScript.SubSup) ? Asc.c_oAscMathInterfaceScript.Sub : Asc.c_oAscMathInterfaceScript.None }
+ });
+ arr.push(mnu);
+ }
+ }
+ break;
+ case Asc.c_oAscMathInterfaceType.Fraction:
+ var fraction = value.get_FractionType();
+ if (fraction==Asc.c_oAscMathInterfaceFraction.Skewed || fraction==Asc.c_oAscMathInterfaceFraction.Linear) {
+ mnu = new Common.UI.MenuItem({
+ caption : me.txtFractionStacked,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ equationProps: {type: type, callback: 'put_FractionType', value: Asc.c_oAscMathInterfaceFraction.Bar}
+ });
+ arr.push(mnu);
+ }
+ if (fraction==Asc.c_oAscMathInterfaceFraction.Bar || fraction==Asc.c_oAscMathInterfaceFraction.Linear) {
+ mnu = new Common.UI.MenuItem({
+ caption : me.txtFractionSkewed,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ equationProps: {type: type, callback: 'put_FractionType', value: Asc.c_oAscMathInterfaceFraction.Skewed}
+ });
+ arr.push(mnu);
+ }
+ if (fraction==Asc.c_oAscMathInterfaceFraction.Bar || fraction==Asc.c_oAscMathInterfaceFraction.Skewed) {
+ mnu = new Common.UI.MenuItem({
+ caption : me.txtFractionLinear,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ equationProps: {type: type, callback: 'put_FractionType', value: Asc.c_oAscMathInterfaceFraction.Linear}
+ });
+ arr.push(mnu);
+ }
+ if (fraction==Asc.c_oAscMathInterfaceFraction.Bar || fraction==Asc.c_oAscMathInterfaceFraction.NoBar) {
+ mnu = new Common.UI.MenuItem({
+ caption : (fraction==Asc.c_oAscMathInterfaceFraction.Bar) ? me.txtRemFractionBar : me.txtAddFractionBar,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ equationProps: {type: type, callback: 'put_FractionType', value: (fraction==Asc.c_oAscMathInterfaceFraction.Bar) ? Asc.c_oAscMathInterfaceFraction.NoBar : Asc.c_oAscMathInterfaceFraction.Bar}
+ });
+ arr.push(mnu);
+ }
+ break;
+ case Asc.c_oAscMathInterfaceType.Limit:
+ mnu = new Common.UI.MenuItem({
+ caption : (value.get_Pos()==Asc.c_oAscMathInterfaceLimitPos.Top) ? me.txtLimitUnder : me.txtLimitOver,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ equationProps: {type: type, callback: 'put_Pos', value: (value.get_Pos()==Asc.c_oAscMathInterfaceLimitPos.Top) ? Asc.c_oAscMathInterfaceLimitPos.Bottom : Asc.c_oAscMathInterfaceLimitPos.Top}
+ });
+ arr.push(mnu);
+ mnu = new Common.UI.MenuItem({
+ caption : me.txtRemLimit,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ equationProps: {type: type, callback: 'put_Pos', value: Asc.c_oAscMathInterfaceLimitPos.None}
+ });
+ arr.push(mnu);
+ break;
+ case Asc.c_oAscMathInterfaceType.Matrix:
+ mnu = new Common.UI.MenuItem({
+ caption : value.get_HidePlaceholder() ? me.txtShowPlaceholder : me.txtHidePlaceholder,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ equationProps: {type: type, callback: 'put_HidePlaceholder', value: !value.get_HidePlaceholder()}
+ });
+ arr.push(mnu);
+ mnu = new Common.UI.MenuItem({
+ caption : me.insertText,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ menu : new Common.UI.Menu({
+ menuAlign: 'tl-tr',
+ items : [
+ {
+ caption: me.insertRowAboveText,
+ equationProps: {type: type, callback: 'insert_MatrixRow', value: true}
+ },
+ {
+ caption: me.insertRowBelowText,
+ equationProps: {type: type, callback: 'insert_MatrixRow', value: false}
+ },
+ {
+ caption: me.insertColumnLeftText,
+ equationProps: {type: type, callback: 'insert_MatrixColumn', value: true}
+ },
+ {
+ caption: me.insertColumnRightText,
+ equationProps: {type: type, callback: 'insert_MatrixColumn', value: false}
+ }
+ ]
+ })
+ });
+ arr.push(mnu);
+ mnu = new Common.UI.MenuItem({
+ caption : me.deleteText,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ menu : new Common.UI.Menu({
+ menuAlign: 'tl-tr',
+ items : [
+ {
+ caption: me.deleteRowText,
+ equationProps: {type: type, callback: 'delete_MatrixRow'}
+ },
+ {
+ caption: me.deleteColumnText,
+ equationProps: {type: type, callback: 'delete_MatrixColumn'}
+ }
+ ]
+ })
+ });
+ arr.push(mnu);
+ mnu = new Common.UI.MenuItem({
+ caption : me.txtMatrixAlign,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ menu : new Common.UI.Menu({
+ menuAlign: 'tl-tr',
+ items : [
+ {
+ caption: me.txtTop,
+ checkable : true,
+ checked : (value.get_MatrixAlign()==Asc.c_oAscMathInterfaceMatrixMatrixAlign.Top),
+ equationProps: {type: type, callback: 'put_MatrixAlign', value: Asc.c_oAscMathInterfaceMatrixMatrixAlign.Top}
+ },
+ {
+ caption: me.centerText,
+ checkable : true,
+ checked : (value.get_MatrixAlign()==Asc.c_oAscMathInterfaceMatrixMatrixAlign.Center),
+ equationProps: {type: type, callback: 'put_MatrixAlign', value: Asc.c_oAscMathInterfaceMatrixMatrixAlign.Center}
+ },
+ {
+ caption: me.txtBottom,
+ checkable : true,
+ checked : (value.get_MatrixAlign()==Asc.c_oAscMathInterfaceMatrixMatrixAlign.Bottom),
+ equationProps: {type: type, callback: 'put_MatrixAlign', value: Asc.c_oAscMathInterfaceMatrixMatrixAlign.Bottom}
+ }
+ ]
+ })
+ });
+ arr.push(mnu);
+ mnu = new Common.UI.MenuItem({
+ caption : me.txtColumnAlign,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ menu : new Common.UI.Menu({
+ menuAlign: 'tl-tr',
+ items : [
+ {
+ caption: me.leftText,
+ checkable : true,
+ checked : (value.get_ColumnAlign()==Asc.c_oAscMathInterfaceMatrixColumnAlign.Left),
+ equationProps: {type: type, callback: 'put_ColumnAlign', value: Asc.c_oAscMathInterfaceMatrixColumnAlign.Left}
+ },
+ {
+ caption: me.centerText,
+ checkable : true,
+ checked : (value.get_ColumnAlign()==Asc.c_oAscMathInterfaceMatrixColumnAlign.Center),
+ equationProps: {type: type, callback: 'put_ColumnAlign', value: Asc.c_oAscMathInterfaceMatrixColumnAlign.Center}
+ },
+ {
+ caption: me.rightText,
+ checkable : true,
+ checked : (value.get_ColumnAlign()==Asc.c_oAscMathInterfaceMatrixColumnAlign.Right),
+ equationProps: {type: type, callback: 'put_ColumnAlign', value: Asc.c_oAscMathInterfaceMatrixColumnAlign.Right}
+ }
+ ]
+ })
+ });
+ arr.push(mnu);
+ break;
+ case Asc.c_oAscMathInterfaceType.EqArray:
+ mnu = new Common.UI.MenuItem({
+ caption : me.txtInsertEqBefore,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ equationProps: {type: type, callback: 'insert_Equation', value: true}
+ });
+ arr.push(mnu);
+ mnu = new Common.UI.MenuItem({
+ caption : me.txtInsertEqAfter,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ equationProps: {type: type, callback: 'insert_Equation', value: false}
+ });
+ arr.push(mnu);
+ mnu = new Common.UI.MenuItem({
+ caption : me.txtDeleteEq,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ equationProps: {type: type, callback: 'delete_Equation'}
+ });
+ arr.push(mnu);
+ mnu = new Common.UI.MenuItem({
+ caption : me.alignmentText,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ menu : new Common.UI.Menu({
+ menuAlign: 'tl-tr',
+ items : [
+ {
+ caption: me.txtTop,
+ checkable : true,
+ checked : (value.get_Align()==Asc.c_oAscMathInterfaceEqArrayAlign.Top),
+ equationProps: {type: type, callback: 'put_Align', value: Asc.c_oAscMathInterfaceEqArrayAlign.Top}
+ },
+ {
+ caption: me.centerText,
+ checkable : true,
+ checked : (value.get_Align()==Asc.c_oAscMathInterfaceEqArrayAlign.Center),
+ equationProps: {type: type, callback: 'put_Align', value: Asc.c_oAscMathInterfaceEqArrayAlign.Center}
+ },
+ {
+ caption: me.txtBottom,
+ checkable : true,
+ checked : (value.get_Align()==Asc.c_oAscMathInterfaceEqArrayAlign.Bottom),
+ equationProps: {type: type, callback: 'put_Align', value: Asc.c_oAscMathInterfaceEqArrayAlign.Bottom}
+ }
+ ]
+ })
+ });
+ arr.push(mnu);
+ break;
+ case Asc.c_oAscMathInterfaceType.LargeOperator:
+ mnu = new Common.UI.MenuItem({
+ caption : me.txtLimitChange,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ equationProps: {type: type, callback: 'put_LimitLocation', value: (value.get_LimitLocation() == Asc.c_oAscMathInterfaceNaryLimitLocation.UndOvr) ? Asc.c_oAscMathInterfaceNaryLimitLocation.SubSup : Asc.c_oAscMathInterfaceNaryLimitLocation.UndOvr}
+ });
+ arr.push(mnu);
+ if (value.get_HideUpper() !== undefined) {
+ mnu = new Common.UI.MenuItem({
+ caption : value.get_HideUpper() ? me.txtShowTopLimit : me.txtHideTopLimit,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ equationProps: {type: type, callback: 'put_HideUpper', value: !value.get_HideUpper()}
+ });
+ arr.push(mnu);
+ }
+ if (value.get_HideLower() !== undefined) {
+ mnu = new Common.UI.MenuItem({
+ caption : value.get_HideLower() ? me.txtShowBottomLimit : me.txtHideBottomLimit,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ equationProps: {type: type, callback: 'put_HideLower', value: !value.get_HideLower()}
+ });
+ arr.push(mnu);
+ }
+ break;
+ case Asc.c_oAscMathInterfaceType.Delimiter:
+ mnu = new Common.UI.MenuItem({
+ caption : me.txtInsertArgBefore,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ equationProps: {type: type, callback: 'insert_DelimiterArgument', value: true}
+ });
+ arr.push(mnu);
+ mnu = new Common.UI.MenuItem({
+ caption : me.txtInsertArgAfter,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ equationProps: {type: type, callback: 'insert_DelimiterArgument', value: false}
+ });
+ arr.push(mnu);
+ if (value.can_DeleteArgument()) {
+ mnu = new Common.UI.MenuItem({
+ caption : me.txtDeleteArg,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ equationProps: {type: type, callback: 'delete_DelimiterArgument'}
+ });
+ arr.push(mnu);
+ }
+ mnu = new Common.UI.MenuItem({
+ caption : value.has_Separators() ? me.txtDeleteCharsAndSeparators : me.txtDeleteChars,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ equationProps: {type: type, callback: 'remove_DelimiterCharacters'}
+ });
+ arr.push(mnu);
+ mnu = new Common.UI.MenuItem({
+ caption : value.get_HideOpeningBracket() ? me.txtShowOpenBracket : me.txtHideOpenBracket,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ equationProps: {type: type, callback: 'put_HideOpeningBracket', value: !value.get_HideOpeningBracket()}
+ });
+ arr.push(mnu);
+ mnu = new Common.UI.MenuItem({
+ caption : value.get_HideClosingBracket() ? me.txtShowCloseBracket : me.txtHideCloseBracket,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ equationProps: {type: type, callback: 'put_HideClosingBracket', value: !value.get_HideClosingBracket()}
+ });
+ arr.push(mnu);
+ mnu = new Common.UI.MenuItem({
+ caption : me.txtStretchBrackets,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ checkable : true,
+ checked : value.get_StretchBrackets(),
+ equationProps: {type: type, callback: 'put_StretchBrackets', value: !value.get_StretchBrackets()}
+ });
+ arr.push(mnu);
+ mnu = new Common.UI.MenuItem({
+ caption : me.txtMatchBrackets,
+ equation : true,
+ disabled : (!value.get_StretchBrackets() || me._currentParaObjDisabled),
+ checkable : true,
+ checked : value.get_StretchBrackets() && value.get_MatchBrackets(),
+ equationProps: {type: type, callback: 'put_MatchBrackets', value: !value.get_MatchBrackets()}
+ });
+ arr.push(mnu);
+ break;
+ case Asc.c_oAscMathInterfaceType.GroupChar:
+ if (value.can_ChangePos()) {
+ mnu = new Common.UI.MenuItem({
+ caption : (value.get_Pos()==Asc.c_oAscMathInterfaceGroupCharPos.Top) ? me.txtGroupCharUnder : me.txtGroupCharOver,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ equationProps: {type: type, callback: 'put_Pos', value: (value.get_Pos()==Asc.c_oAscMathInterfaceGroupCharPos.Top) ? Asc.c_oAscMathInterfaceGroupCharPos.Bottom : Asc.c_oAscMathInterfaceGroupCharPos.Top}
+ });
+ arr.push(mnu);
+ mnu = new Common.UI.MenuItem({
+ caption : me.txtDeleteGroupChar,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ equationProps: {type: type, callback: 'put_Pos', value: Asc.c_oAscMathInterfaceGroupCharPos.None}
+ });
+ arr.push(mnu);
+ }
+ break;
+ case Asc.c_oAscMathInterfaceType.Radical:
+ if (value.get_HideDegree() !== undefined) {
+ mnu = new Common.UI.MenuItem({
+ caption : value.get_HideDegree() ? me.txtShowDegree : me.txtHideDegree,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ equationProps: {type: type, callback: 'put_HideDegree', value: !value.get_HideDegree()}
+ });
+ arr.push(mnu);
+ }
+ mnu = new Common.UI.MenuItem({
+ caption : me.txtDeleteRadical,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ equationProps: {type: type, callback: 'remove_Radical'}
+ });
+ arr.push(mnu);
+ break;
+ }
+ if (value.can_IncreaseArgumentSize()) {
+ mnu = new Common.UI.MenuItem({
+ caption : me.txtIncreaseArg,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ equationProps: {type: type, callback: 'increase_ArgumentSize'}
+ });
+ arr.push(mnu);
+ }
+ if (value.can_DecreaseArgumentSize()) {
+ mnu = new Common.UI.MenuItem({
+ caption : me.txtDecreaseArg,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ equationProps: {type: type, callback: 'decrease_ArgumentSize'}
+ });
+ arr.push(mnu);
+ }
+ if (value.can_InsertManualBreak()) {
+ mnu = new Common.UI.MenuItem({
+ caption : me.txtInsertBreak,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ equationProps: {type: type, callback: 'insert_ManualBreak'}
+ });
+ arr.push(mnu);
+ }
+ if (value.can_DeleteManualBreak()) {
+ mnu = new Common.UI.MenuItem({
+ caption : me.txtDeleteBreak,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ equationProps: {type: type, callback: 'delete_ManualBreak'}
+ });
+ arr.push(mnu);
+ }
+ if (value.can_AlignToCharacter()) {
+ mnu = new Common.UI.MenuItem({
+ caption : me.txtAlignToChar,
+ equation : true,
+ disabled : me._currentParaObjDisabled,
+ equationProps: {type: type, callback: 'align_ToCharacter'}
+ });
+ arr.push(mnu);
+ }
+ return arr;
+ },
+
+ addEquationMenu: function(insertIdx) {
+ var me = this;
+
+ me.clearEquationMenu(insertIdx);
+
+ var equationMenu = me.documentHolder.textInShapeMenu,
+ menuItems = me.initEquationMenu();
+
+ if (menuItems.length > 0) {
+ _.each(menuItems, function(menuItem, index) {
+ if (menuItem.menu) {
+ _.each(menuItem.menu.items, function(item) {
+ item.on('click', _.bind(me.equationCallback, me, item.options.equationProps));
+ });
+ } else
+ menuItem.on('click', _.bind(me.equationCallback, me, menuItem.options.equationProps));
+ equationMenu.insertItem(insertIdx, menuItem);
+ insertIdx++;
+ });
+ }
+ return menuItems.length;
+ },
+
+ clearEquationMenu: function(insertIdx) {
+ var me = this;
+ var equationMenu = me.documentHolder.textInShapeMenu;
+ for (var i = insertIdx; i < equationMenu.items.length; i++) {
+ if (equationMenu.items[i].options.equation) {
+ if (equationMenu.items[i].menu) {
+ _.each(equationMenu.items[i].menu.items, function(item) {
+ item.off('click');
+ });
+ } else
+ equationMenu.items[i].off('click');
+ equationMenu.removeItem(equationMenu.items[i]);
+ i--;
+ } else
+ break;
+ }
+ },
+
+ equationCallback: function(eqProps) {
+ var me = this;
+ if (eqProps) {
+ var eqObj;
+ switch (eqProps.type) {
+ case Asc.c_oAscMathInterfaceType.Accent:
+ eqObj = new CMathMenuAccent();
+ break;
+ case Asc.c_oAscMathInterfaceType.BorderBox:
+ eqObj = new CMathMenuBorderBox();
+ break;
+ case Asc.c_oAscMathInterfaceType.Box:
+ eqObj = new CMathMenuBox();
+ break;
+ case Asc.c_oAscMathInterfaceType.Bar:
+ eqObj = new CMathMenuBar();
+ break;
+ case Asc.c_oAscMathInterfaceType.Script:
+ eqObj = new CMathMenuScript();
+ break;
+ case Asc.c_oAscMathInterfaceType.Fraction:
+ eqObj = new CMathMenuFraction();
+ break;
+ case Asc.c_oAscMathInterfaceType.Limit:
+ eqObj = new CMathMenuLimit();
+ break;
+ case Asc.c_oAscMathInterfaceType.Matrix:
+ eqObj = new CMathMenuMatrix();
+ break;
+ case Asc.c_oAscMathInterfaceType.EqArray:
+ eqObj = new CMathMenuEqArray();
+ break;
+ case Asc.c_oAscMathInterfaceType.LargeOperator:
+ eqObj = new CMathMenuNary();
+ break;
+ case Asc.c_oAscMathInterfaceType.Delimiter:
+ eqObj = new CMathMenuDelimiter();
+ break;
+ case Asc.c_oAscMathInterfaceType.GroupChar:
+ eqObj = new CMathMenuGroupCharacter();
+ break;
+ case Asc.c_oAscMathInterfaceType.Radical:
+ eqObj = new CMathMenuRadical();
+ break;
+ case Asc.c_oAscMathInterfaceType.Common:
+ eqObj = new CMathMenuBase();
+ break;
+ }
+ if (eqObj) {
+ eqObj[eqProps.callback](eqProps.value);
+ me.api.asc_SetMathProps(eqObj);
+ }
+ }
+ Common.NotificationCenter.trigger('edit:complete', me.documentHolder);
+ },
+
guestText : 'Guest',
textCtrlClick : 'Press CTRL and click link',
txtHeight : 'Height',
@@ -1555,7 +2189,78 @@ define([
textInsertTop : 'Insert Top',
textSym : 'sym',
notcriticalErrorTitle: 'Warning',
- errorInvalidLink: 'The link reference does not exist. Please correct the link or delete it.'
+ errorInvalidLink: 'The link reference does not exist. Please correct the link or delete it.',
+ txtRemoveAccentChar: 'Remove accent character',
+ txtBorderProps: 'Borders property',
+ txtHideTop: 'Hide top border',
+ txtHideBottom: 'Hide bottom border',
+ txtHideLeft: 'Hide left border',
+ txtHideRight: 'Hide right border',
+ txtHideHor: 'Hide horizontal line',
+ txtHideVer: 'Hide vertical line',
+ txtHideLT: 'Hide left top line',
+ txtHideLB: 'Hide left bottom line',
+ txtAddTop: 'Add top border',
+ txtAddBottom: 'Add bottom border',
+ txtAddLeft: 'Add left border',
+ txtAddRight: 'Add right border',
+ txtAddHor: 'Add horizontal line',
+ txtAddVer: 'Add vertical line',
+ txtAddLT: 'Add left top line',
+ txtAddLB: 'Add left bottom line',
+ txtRemoveBar: 'Remove bar',
+ txtOverbar: 'Bar over text',
+ txtUnderbar: 'Bar under text',
+ txtRemScripts: 'Remove scripts',
+ txtRemSubscript: 'Remove subscript',
+ txtRemSuperscript: 'Remove superscript',
+ txtScriptsAfter: 'Scripts after text',
+ txtScriptsBefore: 'Scripts before text',
+ txtFractionStacked: 'Change to stacked fraction',
+ txtFractionSkewed: 'Change to skewed fraction',
+ txtFractionLinear: 'Change to linear fraction',
+ txtRemFractionBar: 'Remove fraction bar',
+ txtAddFractionBar: 'Add fraction bar',
+ txtRemLimit: 'Remove limit',
+ txtLimitOver: 'Limit over text',
+ txtLimitUnder: 'Limit under text',
+ txtHidePlaceholder: 'Hide placeholder',
+ txtShowPlaceholder: 'Show placeholder',
+ txtMatrixAlign: 'Matrix alignment',
+ txtColumnAlign: 'Column alignment',
+ txtTop: 'Top',
+ txtBottom: 'Bottom',
+ txtInsertEqBefore: 'Insert equation before',
+ txtInsertEqAfter: 'Insert equation after',
+ txtDeleteEq: 'Delete equation',
+ txtLimitChange: 'Change limits location',
+ txtHideTopLimit: 'Hide top limit',
+ txtShowTopLimit: 'Show top limit',
+ txtHideBottomLimit: 'Hide bottom limit',
+ txtShowBottomLimit: 'Show bottom limit',
+ txtInsertArgBefore: 'Insert argument before',
+ txtInsertArgAfter: 'Insert argument after',
+ txtDeleteArg: 'Delete argument',
+ txtHideOpenBracket: 'Hide opening bracket',
+ txtShowOpenBracket: 'Show opening bracket',
+ txtHideCloseBracket: 'Hide closing bracket',
+ txtShowCloseBracket: 'Show closing bracket',
+ txtStretchBrackets: 'Stretch brackets',
+ txtMatchBrackets: 'Match brackets to argument height',
+ txtGroupCharOver: 'Char over text',
+ txtGroupCharUnder: 'Char under text',
+ txtDeleteGroupChar: 'Delete char',
+ txtHideDegree: 'Hide degree',
+ txtShowDegree: 'Show degree',
+ txtIncreaseArg: 'Increase argument size',
+ txtDecreaseArg: 'Decrease argument size',
+ txtInsertBreak: 'Insert manual break',
+ txtDeleteBreak: 'Delete manual break',
+ txtAlignToChar: 'Align to character',
+ txtDeleteRadical: 'Delete radical',
+ txtDeleteChars: 'Delete enclosing characters',
+ txtDeleteCharsAndSeparators: 'Delete enclosing characters and separators'
+
}, SSE.Controllers.DocumentHolder || {}));
});
\ No newline at end of file
diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js
index 72472d56f..41d842f24 100644
--- a/apps/spreadsheeteditor/main/app/controller/Main.js
+++ b/apps/spreadsheeteditor/main/app/controller/Main.js
@@ -77,6 +77,7 @@ define([
models: [],
collections: [
'ShapeGroups',
+ 'EquationGroups',
'TableTemplates',
'Common.Collections.TextArt'
],
diff --git a/apps/spreadsheeteditor/main/app/controller/Toolbar.js b/apps/spreadsheeteditor/main/app/controller/Toolbar.js
index b44f910eb..eedb59f63 100644
--- a/apps/spreadsheeteditor/main/app/controller/Toolbar.js
+++ b/apps/spreadsheeteditor/main/app/controller/Toolbar.js
@@ -2097,7 +2097,7 @@ define([
},
fillEquations: function() {
- if (!this.toolbar.btnInsertEquation.rendered) return;
+ if (!this.toolbar.btnInsertEquation.rendered || this.toolbar.btnInsertEquation.menu.items.length>0) return;
var me = this, equationsStore = this.getApplication().getCollection('EquationGroups');
@@ -2171,7 +2171,7 @@ define([
},
onInsertEquationClick: function() {
- if (this.api && !this._state.in_equation) {
+ if (this.api) {
this.api.asc_AddMath();
Common.component.Analytics.trackEvent('ToolBar', 'Add Equation');
}
@@ -2339,8 +2339,7 @@ define([
is_shape_text = seltype == Asc.c_oAscSelectionType.RangeShapeText,
is_shape = seltype == Asc.c_oAscSelectionType.RangeShape,
is_image = seltype == Asc.c_oAscSelectionType.RangeImage,
- is_equation = seltype == Asc.c_oAscSelectionType.RangeMath,
- is_mode_2 = is_shape_text || is_shape || is_chart_text || is_chart || is_equation;
+ is_mode_2 = is_shape_text || is_shape || is_chart_text || is_chart;
if ( coauth_disable ) {
toolbar.lockToolbar(SSE.enumLock.coAuth, coauth_disable);
@@ -2353,7 +2352,6 @@ define([
case Asc.c_oAscSelectionType.RangeShapeText: type = _set.selShapeText; break;
case Asc.c_oAscSelectionType.RangeChart: type = _set.selChart; break;
case Asc.c_oAscSelectionType.RangeChartText: type = _set.selChartText; break;
- case Asc.c_oAscSelectionType.RangeMath: type = _set.selEquation; break;
}
toolbar.lockToolbar(type, type != seltype, {
@@ -2368,7 +2366,7 @@ define([
toolbar.mnuitemClearFilter
],
merge: true,
- clear: [_set.selImage, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selEquation, _set.coAuth]
+ clear: [_set.selImage, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.coAuth]
});
}
diff --git a/apps/spreadsheeteditor/main/app/template/Toolbar.template b/apps/spreadsheeteditor/main/app/template/Toolbar.template
index 201a58329..45a6cf555 100644
--- a/apps/spreadsheeteditor/main/app/template/Toolbar.template
+++ b/apps/spreadsheeteditor/main/app/template/Toolbar.template
@@ -223,7 +223,7 @@
-
+
diff --git a/apps/spreadsheeteditor/main/app/view/Toolbar.js b/apps/spreadsheeteditor/main/app/view/Toolbar.js
index ce5aafd48..9ec106d63 100644
--- a/apps/spreadsheeteditor/main/app/view/Toolbar.js
+++ b/apps/spreadsheeteditor/main/app/view/Toolbar.js
@@ -75,8 +75,7 @@ define([
ruleFilter: 'rule-filter',
ruleDelFilter: 'rule-clear-filter',
menuFileOpen: 'menu-file-open',
- cantPrint: 'cant-print',
- selEquation: 'sel-equation'
+ cantPrint: 'cant-print'
};
SSE.Views.Toolbar = Backbone.View.extend(_.extend({
@@ -326,7 +325,7 @@ define([
icls : 'btn-border-out',
borderId : 'outer',
borderswidth: 'thin',
- lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selEquation, _set.lostConnect, _set.coAuth],
+ lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.lostConnect, _set.coAuth],
split : true,
menu : true
});
@@ -374,7 +373,7 @@ define([
enableToggle: true,
allowDepress: true,
split : true,
- lock : [_set.editCell, _set.selShape, _set.selShapeText, _set.selChart, _set.selChartText, _set.selImage, _set.selEquation, _set.lostConnect, _set.coAuth, _set.ruleMerge],
+ lock : [_set.editCell, _set.selShape, _set.selShapeText, _set.selChart, _set.selChartText, _set.selImage, _set.lostConnect, _set.coAuth, _set.ruleMerge],
menu : new Common.UI.Menu({
items: [
{
@@ -428,7 +427,7 @@ define([
id : 'id-toolbar-rtn-wrap',
cls : 'btn-toolbar',
iconCls : 'btn-wrap',
- lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selEquation, _set.lostConnect, _set.coAuth],
+ lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.lostConnect, _set.coAuth],
enableToggle: true,
allowDepress: true
});
@@ -437,7 +436,7 @@ define([
id : 'id-toolbar-rtn-textorient',
cls : 'btn-toolbar',
iconCls : 'btn-text-orient',
- lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selEquation, _set.lostConnect, _set.coAuth],
+ lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.lostConnect, _set.coAuth],
menu : new Common.UI.Menu({
items: [
{
@@ -587,21 +586,21 @@ define([
id : 'id-toolbar-btn-sort-down',
cls : 'btn-toolbar',
iconCls : 'btn-sort-down',
- lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selEquation, _set.lostConnect, _set.coAuth, _set.ruleFilter]
+ lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.lostConnect, _set.coAuth, _set.ruleFilter]
});
me.btnSortUp = new Common.UI.Button({
id : 'id-toolbar-btn-sort-up',
cls : 'btn-toolbar',
iconCls : 'btn-sort-up',
- lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selEquation, _set.lostConnect, _set.coAuth, _set.ruleFilter]
+ lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.lostConnect, _set.coAuth, _set.ruleFilter]
});
me.btnSetAutofilter = new Common.UI.Button({
id : 'id-toolbar-btn-setautofilter',
cls : 'btn-toolbar',
iconCls : 'btn-autofilter',
- lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selEquation, _set.lostConnect, _set.coAuth, _set.ruleFilter],
+ lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.lostConnect, _set.coAuth, _set.ruleFilter],
enableToggle: true
});
@@ -609,7 +608,7 @@ define([
id : 'id-toolbar-btn-clearfilter',
cls : 'btn-toolbar',
iconCls : 'btn-clear-filter',
- lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selEquation, _set.lostConnect, _set.coAuth, _set.ruleDelFilter]
+ lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.lostConnect, _set.coAuth, _set.ruleDelFilter]
});
me.btnSearch = new Common.UI.Button({
@@ -623,7 +622,7 @@ define([
id : 'id-toolbar-btn-ttempl',
cls : 'btn-toolbar',
iconCls : 'btn-ttempl',
- lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selEquation, _set.lostConnect, _set.coAuth, _set.ruleFilter],
+ lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.lostConnect, _set.coAuth, _set.ruleFilter],
menu : new Common.UI.Menu({
items: [
{ template: _.template('') }
@@ -638,7 +637,7 @@ define([
itemHeight : 38,
hint : this.tipCellStyle,
menuMaxHeight : 226,
- lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selEquation, _set.lostConnect, _set.coAuth],
+ lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.lostConnect, _set.coAuth],
beforeOpenHandler: function(e) {
var cmp = this,
menu = cmp.openButton.menu,
@@ -674,7 +673,7 @@ define([
cls : 'btn-toolbar btn-text-value',
caption : me.txtGeneral,
style : 'width: 100%;',
- lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selRange, _set.selEquation, _set.lostConnect, _set.coAuth],
+ lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selRange, _set.lostConnect, _set.coAuth],
menu : true
});
@@ -682,7 +681,7 @@ define([
id : 'id-toolbar-btn-percent-style',
cls : 'btn-toolbar',
iconCls : 'btn-percent-style',
- lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selEquation, _set.lostConnect, _set.coAuth],
+ lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.lostConnect, _set.coAuth],
styleName : 'Percent'
});
@@ -690,7 +689,7 @@ define([
id : 'id-toolbar-btn-accounting-style',
cls : 'btn-toolbar',
iconCls : 'btn-currency-style',
- lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selEquation, _set.lostConnect, _set.coAuth],
+ lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.lostConnect, _set.coAuth],
styleName : 'Currency',
split : true,
menu : new Common.UI.Menu({
@@ -724,14 +723,14 @@ define([
id : 'id-toolbar-btn-decdecimal',
cls : 'btn-toolbar',
iconCls : 'btn-decdecimal',
- lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selEquation, _set.lostConnect, _set.coAuth]
+ lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.lostConnect, _set.coAuth]
});
me.btnIncDecimal = new Common.UI.Button({
id : 'id-toolbar-btn-incdecimal',
cls : 'btn-toolbar',
iconCls : 'btn-incdecimal',
- lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selEquation, _set.lostConnect, _set.coAuth]
+ lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.lostConnect, _set.coAuth]
});
me.btnInsertFormula = new Common.UI.Button({
@@ -739,7 +738,7 @@ define([
cls : 'btn-toolbar',
iconCls : 'btn-formula',
split : true,
- lock : [_set.editText, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selRange, _set.selEquation, _set.lostConnect, _set.coAuth],
+ lock : [_set.editText, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selRange, _set.lostConnect, _set.coAuth],
menu : new Common.UI.Menu({
style : 'min-width: 110px',
items : [
@@ -760,7 +759,7 @@ define([
id : 'id-toolbar-btn-insertrange',
cls : 'btn-toolbar',
iconCls : 'btn-named-range',
- lock : [_set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selEquation, _set.lostConnect, _set.coAuth, _set.selRange],
+ lock : [_set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.lostConnect, _set.coAuth, _set.selRange],
menu : new Common.UI.Menu({
style : 'min-width: 110px',
items : [
@@ -796,22 +795,22 @@ define([
},
{
caption : me.txtClearText,
- lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selEquation, _set.coAuth],
+ lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.coAuth],
value : Asc.c_oAscCleanOptions.Text
},
{
caption : me.txtClearFormat,
- lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selEquation, _set.coAuth],
+ lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.coAuth],
value : Asc.c_oAscCleanOptions.Format
},
{
caption : me.txtClearComments,
- lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selEquation, _set.coAuth],
+ lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.coAuth],
value : Asc.c_oAscCleanOptions.Comments
},
{
caption : me.txtClearHyper,
- lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selEquation, _set.coAuth],
+ lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.coAuth],
value : Asc.c_oAscCleanOptions.Hyperlinks
}
]
@@ -830,7 +829,7 @@ define([
id : 'id-toolbar-btn-addcell',
cls : 'btn-toolbar',
iconCls : 'btn-addcell',
- lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selEquation, _set.lostConnect, _set.coAuth],
+ lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.lostConnect, _set.coAuth],
menu : new Common.UI.Menu({
items : [
{
@@ -857,7 +856,7 @@ define([
id : 'id-toolbar-btn-delcell',
cls : 'btn-toolbar',
iconCls : 'btn-delcell',
- lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selEquation, _set.lostConnect, _set.coAuth],
+ lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.lostConnect, _set.coAuth],
menu : new Common.UI.Menu({
items : [
{
@@ -1047,32 +1046,32 @@ define([
id : 'id-toolbar-btn-autofilter',
cls : 'btn-toolbar',
iconCls : 'btn-autofilter',
- lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selEquation, _set.lostConnect, _set.coAuth, _set.ruleFilter],
+ lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.lostConnect, _set.coAuth, _set.ruleFilter],
menu : new Common.UI.Menu({
items : [
me.mnuitemSortAZ = new Common.UI.MenuItem({
caption : me.txtSortAZ,
iconCls : 'mnu-sort-asc',
- lock : [_set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selEquation, _set.coAuth, _set.ruleFilter],
+ lock : [_set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.coAuth, _set.ruleFilter],
value : Asc.c_oAscSortOptions.Ascending
}),
me.mnuitemSortZA = new Common.UI.MenuItem({
caption : me.txtSortZA,
iconCls : 'mnu-sort-desc',
- lock : [_set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selEquation, _set.coAuth, _set.ruleFilter],
+ lock : [_set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.coAuth, _set.ruleFilter],
value : Asc.c_oAscSortOptions.Descending
}),
me.mnuitemAutoFilter = new Common.UI.MenuItem({
caption : me.txtFilter,
iconCls : 'mnu-filter-add',
checkable: true,
- lock : [_set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selEquation, _set.coAuth, _set.ruleFilter],
+ lock : [_set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.coAuth, _set.ruleFilter],
value : 'set-filter'
}),
me.mnuitemClearFilter = new Common.UI.MenuItem({
caption : me.txtClearFilter,
iconCls : 'mnu-filter-clear',
- lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.selEquation, _set.coAuth, _set.ruleDelFilter],
+ lock : [_set.editCell, _set.selChart, _set.selChartText, _set.selShape, _set.selShapeText, _set.selImage, _set.coAuth, _set.ruleDelFilter],
value : 'clear-filter'
})
/*,{
diff --git a/apps/spreadsheeteditor/main/locale/en.json b/apps/spreadsheeteditor/main/locale/en.json
index 9bfe5a23e..c27298fe1 100644
--- a/apps/spreadsheeteditor/main/locale/en.json
+++ b/apps/spreadsheeteditor/main/locale/en.json
@@ -111,6 +111,76 @@
"SSE.Controllers.DocumentHolder.txtHeight": "Height",
"SSE.Controllers.DocumentHolder.txtRowHeight": "Row Height",
"SSE.Controllers.DocumentHolder.txtWidth": "Width",
+ "SSE.Controllers.DocumentHolder.txtRemoveAccentChar": "Remove accent character",
+ "SSE.Controllers.DocumentHolder.txtBorderProps": "Borders property",
+ "SSE.Controllers.DocumentHolder.txtHideTop": "Hide top border",
+ "SSE.Controllers.DocumentHolder.txtHideBottom": "Hide bottom border",
+ "SSE.Controllers.DocumentHolder.txtHideLeft": "Hide left border",
+ "SSE.Controllers.DocumentHolder.txtHideRight": "Hide right border",
+ "SSE.Controllers.DocumentHolder.txtHideHor": "Hide horizontal line",
+ "SSE.Controllers.DocumentHolder.txtHideVer": "Hide vertical line",
+ "SSE.Controllers.DocumentHolder.txtHideLT": "Hide left top line",
+ "SSE.Controllers.DocumentHolder.txtHideLB": "Hide left bottom line",
+ "SSE.Controllers.DocumentHolder.txtAddTop": "Add top border",
+ "SSE.Controllers.DocumentHolder.txtAddBottom": "Add bottom border",
+ "SSE.Controllers.DocumentHolder.txtAddLeft": "Add left border",
+ "SSE.Controllers.DocumentHolder.txtAddRight": "Add right border",
+ "SSE.Controllers.DocumentHolder.txtAddHor": "Add horizontal line",
+ "SSE.Controllers.DocumentHolder.txtAddVer": "Add vertical line",
+ "SSE.Controllers.DocumentHolder.txtAddLT": "Add left top line",
+ "SSE.Controllers.DocumentHolder.txtAddLB": "Add left bottom line",
+ "SSE.Controllers.DocumentHolder.txtRemoveBar": "Remove bar",
+ "SSE.Controllers.DocumentHolder.txtOverbar": "Bar over text",
+ "SSE.Controllers.DocumentHolder.txtUnderbar": "Bar under text",
+ "SSE.Controllers.DocumentHolder.txtRemScripts": "Remove scripts",
+ "SSE.Controllers.DocumentHolder.txtRemSubscript": "Remove subscript",
+ "SSE.Controllers.DocumentHolder.txtRemSuperscript": "Remove superscript",
+ "SSE.Controllers.DocumentHolder.txtScriptsAfter": "Scripts after text",
+ "SSE.Controllers.DocumentHolder.txtScriptsBefore": "Scripts before text",
+ "SSE.Controllers.DocumentHolder.txtFractionStacked": "Change to stacked fraction",
+ "SSE.Controllers.DocumentHolder.txtFractionSkewed": "Change to skewed fraction",
+ "SSE.Controllers.DocumentHolder.txtFractionLinear": "Change to linear fraction",
+ "SSE.Controllers.DocumentHolder.txtRemFractionBar": "Remove fraction bar",
+ "SSE.Controllers.DocumentHolder.txtAddFractionBar": "Add fraction bar",
+ "SSE.Controllers.DocumentHolder.txtRemLimit": "Remove limit",
+ "SSE.Controllers.DocumentHolder.txtLimitOver": "Limit over text",
+ "SSE.Controllers.DocumentHolder.txtLimitUnder": "Limit under text",
+ "SSE.Controllers.DocumentHolder.txtHidePlaceholder": "Hide placeholder",
+ "SSE.Controllers.DocumentHolder.txtShowPlaceholder": "Show placeholder",
+ "SSE.Controllers.DocumentHolder.txtMatrixAlign": "Matrix alignment",
+ "SSE.Controllers.DocumentHolder.txtColumnAlign": "Column alignment",
+ "SSE.Controllers.DocumentHolder.txtTop": "Top",
+ "SSE.Controllers.DocumentHolder.txtBottom": "Bottom",
+ "SSE.Controllers.DocumentHolder.txtInsertEqBefore": "Insert equation before",
+ "SSE.Controllers.DocumentHolder.txtInsertEqAfter": "Insert equation after",
+ "SSE.Controllers.DocumentHolder.txtDeleteEq": "Delete equation",
+ "SSE.Controllers.DocumentHolder.txtLimitChange": "Change limits location",
+ "SSE.Controllers.DocumentHolder.txtHideTopLimit": "Hide top limit",
+ "SSE.Controllers.DocumentHolder.txtShowTopLimit": "Show top limit",
+ "SSE.Controllers.DocumentHolder.txtHideBottomLimit": "Hide bottom limit",
+ "SSE.Controllers.DocumentHolder.txtShowBottomLimit": "Show bottom limit",
+ "SSE.Controllers.DocumentHolder.txtInsertArgBefore": "Insert argument before",
+ "SSE.Controllers.DocumentHolder.txtInsertArgAfter": "Insert argument after",
+ "SSE.Controllers.DocumentHolder.txtDeleteArg": "Delete argument",
+ "SSE.Controllers.DocumentHolder.txtHideOpenBracket": "Hide opening bracket",
+ "SSE.Controllers.DocumentHolder.txtShowOpenBracket": "Show opening bracket",
+ "SSE.Controllers.DocumentHolder.txtHideCloseBracket": "Hide closing bracket",
+ "SSE.Controllers.DocumentHolder.txtShowCloseBracket": "Show closing bracket",
+ "SSE.Controllers.DocumentHolder.txtStretchBrackets": "Stretch brackets",
+ "SSE.Controllers.DocumentHolder.txtMatchBrackets": "Match brackets to argument height",
+ "SSE.Controllers.DocumentHolder.txtGroupCharOver": "Char over text",
+ "SSE.Controllers.DocumentHolder.txtGroupCharUnder": "Char under text",
+ "SSE.Controllers.DocumentHolder.txtDeleteGroupChar": "Delete char",
+ "SSE.Controllers.DocumentHolder.txtHideDegree": "Hide degree",
+ "SSE.Controllers.DocumentHolder.txtShowDegree": "Show degree",
+ "SSE.Controllers.DocumentHolder.txtIncreaseArg": "Increase argument size",
+ "SSE.Controllers.DocumentHolder.txtDecreaseArg": "Decrease argument size",
+ "SSE.Controllers.DocumentHolder.txtInsertBreak": "Insert manual break",
+ "SSE.Controllers.DocumentHolder.txtDeleteBreak": "Delete manual break",
+ "SSE.Controllers.DocumentHolder.txtAlignToChar": "Align to character",
+ "SSE.Controllers.DocumentHolder.txtDeleteRadical": "Delete radical",
+ "SSE.Controllers.DocumentHolder.txtDeleteChars": "Delete enclosing characters",
+ "SSE.Controllers.DocumentHolder.txtDeleteCharsAndSeparators": "Delete enclosing characters and separators",
"SSE.Controllers.LeftMenu.newDocumentTitle": "Unnamed spreadsheet",
"SSE.Controllers.LeftMenu.textByColumns": "By columns",
"SSE.Controllers.LeftMenu.textByRows": "By rows",
@@ -258,6 +328,334 @@
"SSE.Controllers.Toolbar.textFontSizeErr": "The entered value is incorrect.
Please enter a numeric value between 1 and 409",
"SSE.Controllers.Toolbar.textWarning": "Warning",
"SSE.Controllers.Toolbar.warnMergeLostData": "Only the data from the upper-left cell will remain in the merged cell.
Are you sure you want to continue?",
+ "SSE.Controllers.Toolbar.textAccent": "Accents",
+ "SSE.Controllers.Toolbar.textBracket": "Brackets",
+ "SSE.Controllers.Toolbar.textFraction": "Fractions",
+ "SSE.Controllers.Toolbar.textFunction": "Functions",
+ "SSE.Controllers.Toolbar.textIntegral": "Integrals",
+ "SSE.Controllers.Toolbar.textLargeOperator": "Large Operators",
+ "SSE.Controllers.Toolbar.textLimitAndLog": "Limits And Logarithms",
+ "SSE.Controllers.Toolbar.textMatrix": "Matrices",
+ "SSE.Controllers.Toolbar.textOperator": "Operators",
+ "SSE.Controllers.Toolbar.textRadical": "Radicals",
+ "SSE.Controllers.Toolbar.textScript": "Scripts",
+ "SSE.Controllers.Toolbar.textSymbols": "Symbols",
+ "SSE.Controllers.Toolbar.txtAccent_Accent": "Acute",
+ "SSE.Controllers.Toolbar.txtAccent_ArrowD": "Right-Left Arrow Above",
+ "SSE.Controllers.Toolbar.txtAccent_ArrowL": "Leftwards Arrow Above",
+ "SSE.Controllers.Toolbar.txtAccent_ArrowR": "Rightwards Arrow Above",
+ "SSE.Controllers.Toolbar.txtAccent_Bar": "Bar",
+ "SSE.Controllers.Toolbar.txtAccent_BarBot": "Underbar",
+ "SSE.Controllers.Toolbar.txtAccent_BarTop": "Overbar",
+ "SSE.Controllers.Toolbar.txtAccent_BorderBox": "Boxed Formula (With Placeholder)",
+ "SSE.Controllers.Toolbar.txtAccent_BorderBoxCustom": "Boxed Formula(Example)",
+ "SSE.Controllers.Toolbar.txtAccent_Check": "Check",
+ "SSE.Controllers.Toolbar.txtAccent_CurveBracketBot": "Underbrace",
+ "SSE.Controllers.Toolbar.txtAccent_CurveBracketTop": "Overbrace",
+ "SSE.Controllers.Toolbar.txtAccent_Custom_1": "Vector A",
+ "SSE.Controllers.Toolbar.txtAccent_Custom_2": "ABC With Overbar",
+ "SSE.Controllers.Toolbar.txtAccent_Custom_3": "x XOR y With Overbar",
+ "SSE.Controllers.Toolbar.txtAccent_DDDot": "Triple Dot",
+ "SSE.Controllers.Toolbar.txtAccent_DDot": "Double Dot",
+ "SSE.Controllers.Toolbar.txtAccent_Dot": "Dot",
+ "SSE.Controllers.Toolbar.txtAccent_DoubleBar": "Double Overbar",
+ "SSE.Controllers.Toolbar.txtAccent_Grave": "Grave",
+ "SSE.Controllers.Toolbar.txtAccent_GroupBot": "Grouping Character Below",
+ "SSE.Controllers.Toolbar.txtAccent_GroupTop": "Grouping Character Above",
+ "SSE.Controllers.Toolbar.txtAccent_HarpoonL": "Leftwards Harpoon Above",
+ "SSE.Controllers.Toolbar.txtAccent_HarpoonR": "Rightwards Harpoon Above",
+ "SSE.Controllers.Toolbar.txtAccent_Hat": "Hat",
+ "SSE.Controllers.Toolbar.txtAccent_Smile": "Breve",
+ "SSE.Controllers.Toolbar.txtAccent_Tilde": "Tilde",
+ "SSE.Controllers.Toolbar.txtBracket_Angle": "Brackets",
+ "SSE.Controllers.Toolbar.txtBracket_Angle_Delimiter_2": "Brackets with Separators",
+ "SSE.Controllers.Toolbar.txtBracket_Angle_Delimiter_3": "Brackets with Separators",
+ "SSE.Controllers.Toolbar.txtBracket_Angle_NoneOpen": "Single Bracket",
+ "SSE.Controllers.Toolbar.txtBracket_Angle_OpenNone": "Single Bracket",
+ "SSE.Controllers.Toolbar.txtBracket_Curve": "Brackets",
+ "SSE.Controllers.Toolbar.txtBracket_Curve_Delimiter_2": "Brackets with Separators",
+ "SSE.Controllers.Toolbar.txtBracket_Curve_NoneOpen": "Single Bracket",
+ "SSE.Controllers.Toolbar.txtBracket_Curve_OpenNone": "Single Bracket",
+ "SSE.Controllers.Toolbar.txtBracket_Custom_1": "Cases (Two Conditions)",
+ "SSE.Controllers.Toolbar.txtBracket_Custom_2": "Cases (Three Conditions)",
+ "SSE.Controllers.Toolbar.txtBracket_Custom_3": "Stack Object",
+ "SSE.Controllers.Toolbar.txtBracket_Custom_4": "Stack Object",
+ "SSE.Controllers.Toolbar.txtBracket_Custom_5": "Cases Example",
+ "SSE.Controllers.Toolbar.txtBracket_Custom_6": "Binomial Coefficient",
+ "SSE.Controllers.Toolbar.txtBracket_Custom_7": "Binomial Coefficient",
+ "SSE.Controllers.Toolbar.txtBracket_Line": "Brackets",
+ "SSE.Controllers.Toolbar.txtBracket_Line_NoneOpen": "Single Bracket",
+ "SSE.Controllers.Toolbar.txtBracket_Line_OpenNone": "Single Bracket",
+ "SSE.Controllers.Toolbar.txtBracket_LineDouble": "Brackets",
+ "SSE.Controllers.Toolbar.txtBracket_LineDouble_NoneOpen": "Single Bracket",
+ "SSE.Controllers.Toolbar.txtBracket_LineDouble_OpenNone": "Single Bracket",
+ "SSE.Controllers.Toolbar.txtBracket_LowLim": "Brackets",
+ "SSE.Controllers.Toolbar.txtBracket_LowLim_NoneNone": "Single Bracket",
+ "SSE.Controllers.Toolbar.txtBracket_LowLim_OpenNone": "Single Bracket",
+ "SSE.Controllers.Toolbar.txtBracket_Round": "Brackets",
+ "SSE.Controllers.Toolbar.txtBracket_Round_Delimiter_2": "Brackets with Separators",
+ "SSE.Controllers.Toolbar.txtBracket_Round_NoneOpen": "Single Bracket",
+ "SSE.Controllers.Toolbar.txtBracket_Round_OpenNone": "Single Bracket",
+ "SSE.Controllers.Toolbar.txtBracket_Square": "Brackets",
+ "SSE.Controllers.Toolbar.txtBracket_Square_CloseClose": "Brackets",
+ "SSE.Controllers.Toolbar.txtBracket_Square_CloseOpen": "Brackets",
+ "SSE.Controllers.Toolbar.txtBracket_Square_NoneOpen": "Single Bracket",
+ "SSE.Controllers.Toolbar.txtBracket_Square_OpenNone": "Single Bracket",
+ "SSE.Controllers.Toolbar.txtBracket_Square_OpenOpen": "Brackets",
+ "SSE.Controllers.Toolbar.txtBracket_SquareDouble": "Brackets",
+ "SSE.Controllers.Toolbar.txtBracket_SquareDouble_NoneOpen": "Single Bracket",
+ "SSE.Controllers.Toolbar.txtBracket_SquareDouble_OpenNone": "Single Bracket",
+ "SSE.Controllers.Toolbar.txtBracket_UppLim": "Brackets",
+ "SSE.Controllers.Toolbar.txtBracket_UppLim_NoneOpen": "Single Bracket",
+ "SSE.Controllers.Toolbar.txtBracket_UppLim_OpenNone": "Single Bracket",
+ "SSE.Controllers.Toolbar.txtFractionDiagonal": "Skewed Fraction",
+ "SSE.Controllers.Toolbar.txtFractionDifferential_1": "Differential",
+ "SSE.Controllers.Toolbar.txtFractionDifferential_2": "Differential",
+ "SSE.Controllers.Toolbar.txtFractionDifferential_3": "Differential",
+ "SSE.Controllers.Toolbar.txtFractionDifferential_4": "Differential",
+ "SSE.Controllers.Toolbar.txtFractionHorizontal": "Linear Fraction",
+ "SSE.Controllers.Toolbar.txtFractionPi_2": "Pi Over 2",
+ "SSE.Controllers.Toolbar.txtFractionSmall": "Small Fraction",
+ "SSE.Controllers.Toolbar.txtFractionVertical": "Stacked Fraction",
+ "SSE.Controllers.Toolbar.txtFunction_1_Cos": "Inverse Cosine Function",
+ "SSE.Controllers.Toolbar.txtFunction_1_Cosh": "Hyperbolic Inverse Cosine Function",
+ "SSE.Controllers.Toolbar.txtFunction_1_Cot": "Inverse Cotangent Function",
+ "SSE.Controllers.Toolbar.txtFunction_1_Coth": "Hyperbolic Inverse Cotangent Function",
+ "SSE.Controllers.Toolbar.txtFunction_1_Csc": "Inverse Cosecant Function",
+ "SSE.Controllers.Toolbar.txtFunction_1_Csch": "Hyperbolic Inverse Cosecant Function",
+ "SSE.Controllers.Toolbar.txtFunction_1_Sec": "Inverse Secant Function",
+ "SSE.Controllers.Toolbar.txtFunction_1_Sech": "Hyperbolic Inverse Secant Function",
+ "SSE.Controllers.Toolbar.txtFunction_1_Sin": "Inverse Sine Function",
+ "SSE.Controllers.Toolbar.txtFunction_1_Sinh": "Hyperbolic Inverse Sine Function",
+ "SSE.Controllers.Toolbar.txtFunction_1_Tan": "Inverse Tangent Function",
+ "SSE.Controllers.Toolbar.txtFunction_1_Tanh": "Hyperbolic Inverse Tangent Function",
+ "SSE.Controllers.Toolbar.txtFunction_Cos": "Cosine Function",
+ "SSE.Controllers.Toolbar.txtFunction_Cosh": "Hyperbolic Cosine Function",
+ "SSE.Controllers.Toolbar.txtFunction_Cot": "Cotangent Function",
+ "SSE.Controllers.Toolbar.txtFunction_Coth": "Hyperbolic Cotangent Function",
+ "SSE.Controllers.Toolbar.txtFunction_Csc": "Cosecant Function",
+ "SSE.Controllers.Toolbar.txtFunction_Csch": "Hyperbolic Cosecant Function",
+ "SSE.Controllers.Toolbar.txtFunction_Custom_1": "Sine theta",
+ "SSE.Controllers.Toolbar.txtFunction_Custom_2": "Cos 2x",
+ "SSE.Controllers.Toolbar.txtFunction_Custom_3": "Tangent formula",
+ "SSE.Controllers.Toolbar.txtFunction_Sec": "Secant Function",
+ "SSE.Controllers.Toolbar.txtFunction_Sech": "Hyperbolic Secant Function",
+ "SSE.Controllers.Toolbar.txtFunction_Sin": "Sine Function",
+ "SSE.Controllers.Toolbar.txtFunction_Sinh": "Hyperbolic Sine Function",
+ "SSE.Controllers.Toolbar.txtFunction_Tan": "Tangent Function",
+ "SSE.Controllers.Toolbar.txtFunction_Tanh": "Hyperbolic Tangent Function",
+ "SSE.Controllers.Toolbar.txtIntegral": "Integral",
+ "SSE.Controllers.Toolbar.txtIntegral_dtheta": "Differential theta",
+ "SSE.Controllers.Toolbar.txtIntegral_dx": "Differential x",
+ "SSE.Controllers.Toolbar.txtIntegral_dy": "Differential y",
+ "SSE.Controllers.Toolbar.txtIntegralCenterSubSup": "Integral",
+ "SSE.Controllers.Toolbar.txtIntegralDouble": "Double Integral",
+ "SSE.Controllers.Toolbar.txtIntegralDoubleCenterSubSup": "Double Integral",
+ "SSE.Controllers.Toolbar.txtIntegralDoubleSubSup": "Double Integral",
+ "SSE.Controllers.Toolbar.txtIntegralOriented": "Contour Integral",
+ "SSE.Controllers.Toolbar.txtIntegralOrientedCenterSubSup": "Contour Integral",
+ "SSE.Controllers.Toolbar.txtIntegralOrientedDouble": "Surface Integral",
+ "SSE.Controllers.Toolbar.txtIntegralOrientedDoubleCenterSubSup": "Surface Integral",
+ "SSE.Controllers.Toolbar.txtIntegralOrientedDoubleSubSup": "Surface Integral",
+ "SSE.Controllers.Toolbar.txtIntegralOrientedSubSup": "Contour Integral",
+ "SSE.Controllers.Toolbar.txtIntegralOrientedTriple": "Volume Integral",
+ "SSE.Controllers.Toolbar.txtIntegralOrientedTripleCenterSubSup": "Volume Integral",
+ "SSE.Controllers.Toolbar.txtIntegralOrientedTripleSubSup": "Volume Integral",
+ "SSE.Controllers.Toolbar.txtIntegralSubSup": "Integral",
+ "SSE.Controllers.Toolbar.txtIntegralTriple": "Triple Integral",
+ "SSE.Controllers.Toolbar.txtIntegralTripleCenterSubSup": "Triple Integral",
+ "SSE.Controllers.Toolbar.txtIntegralTripleSubSup": "Triple Integral",
+ "SSE.Controllers.Toolbar.txtLargeOperator_Conjunction": "Wedge",
+ "SSE.Controllers.Toolbar.txtLargeOperator_Conjunction_CenterSub": "Wedge",
+ "SSE.Controllers.Toolbar.txtLargeOperator_Conjunction_CenterSubSup": "Wedge",
+ "SSE.Controllers.Toolbar.txtLargeOperator_Conjunction_Sub": "Wedge",
+ "SSE.Controllers.Toolbar.txtLargeOperator_Conjunction_SubSup": "Wedge",
+ "SSE.Controllers.Toolbar.txtLargeOperator_CoProd": "Co-Product",
+ "SSE.Controllers.Toolbar.txtLargeOperator_CoProd_CenterSub": "Co-Product",
+ "SSE.Controllers.Toolbar.txtLargeOperator_CoProd_CenterSubSup": "Co-Product",
+ "SSE.Controllers.Toolbar.txtLargeOperator_CoProd_Sub": "Co-Product",
+ "SSE.Controllers.Toolbar.txtLargeOperator_CoProd_SubSup": "Co-Product",
+ "SSE.Controllers.Toolbar.txtLargeOperator_Custom_1": "Summation",
+ "SSE.Controllers.Toolbar.txtLargeOperator_Custom_2": "Summation",
+ "SSE.Controllers.Toolbar.txtLargeOperator_Custom_3": "Summation",
+ "SSE.Controllers.Toolbar.txtLargeOperator_Custom_4": "Product",
+ "SSE.Controllers.Toolbar.txtLargeOperator_Custom_5": "Union",
+ "SSE.Controllers.Toolbar.txtLargeOperator_Disjunction": "Vee",
+ "SSE.Controllers.Toolbar.txtLargeOperator_Disjunction_CenterSub": "Vee",
+ "SSE.Controllers.Toolbar.txtLargeOperator_Disjunction_CenterSubSup": "Vee",
+ "SSE.Controllers.Toolbar.txtLargeOperator_Disjunction_Sub": "Vee",
+ "SSE.Controllers.Toolbar.txtLargeOperator_Disjunction_SubSup": "Vee",
+ "SSE.Controllers.Toolbar.txtLargeOperator_Intersection": "Intersection",
+ "SSE.Controllers.Toolbar.txtLargeOperator_Intersection_CenterSub": "Intersection",
+ "SSE.Controllers.Toolbar.txtLargeOperator_Intersection_CenterSubSup": "Intersection",
+ "SSE.Controllers.Toolbar.txtLargeOperator_Intersection_Sub": "Intersection",
+ "SSE.Controllers.Toolbar.txtLargeOperator_Intersection_SubSup": "Intersection",
+ "SSE.Controllers.Toolbar.txtLargeOperator_Prod": "Product",
+ "SSE.Controllers.Toolbar.txtLargeOperator_Prod_CenterSub": "Product",
+ "SSE.Controllers.Toolbar.txtLargeOperator_Prod_CenterSubSup": "Product",
+ "SSE.Controllers.Toolbar.txtLargeOperator_Prod_Sub": "Product",
+ "SSE.Controllers.Toolbar.txtLargeOperator_Prod_SubSup": "Product",
+ "SSE.Controllers.Toolbar.txtLargeOperator_Sum": "Summation",
+ "SSE.Controllers.Toolbar.txtLargeOperator_Sum_CenterSub": "Summation",
+ "SSE.Controllers.Toolbar.txtLargeOperator_Sum_CenterSubSup": "Summation",
+ "SSE.Controllers.Toolbar.txtLargeOperator_Sum_Sub": "Summation",
+ "SSE.Controllers.Toolbar.txtLargeOperator_Sum_SubSup": "Summation",
+ "SSE.Controllers.Toolbar.txtLargeOperator_Union": "Union",
+ "SSE.Controllers.Toolbar.txtLargeOperator_Union_CenterSub": "Union",
+ "SSE.Controllers.Toolbar.txtLargeOperator_Union_CenterSubSup": "Union",
+ "SSE.Controllers.Toolbar.txtLargeOperator_Union_Sub": "Union",
+ "SSE.Controllers.Toolbar.txtLargeOperator_Union_SubSup": "Union",
+ "SSE.Controllers.Toolbar.txtLimitLog_Custom_1": "Limit Example",
+ "SSE.Controllers.Toolbar.txtLimitLog_Custom_2": "Maximum Example",
+ "SSE.Controllers.Toolbar.txtLimitLog_Lim": "Limit",
+ "SSE.Controllers.Toolbar.txtLimitLog_Ln": "Natural Logarithm",
+ "SSE.Controllers.Toolbar.txtLimitLog_Log": "Logarithm",
+ "SSE.Controllers.Toolbar.txtLimitLog_LogBase": "Logarithm",
+ "SSE.Controllers.Toolbar.txtLimitLog_Max": "Maximum",
+ "SSE.Controllers.Toolbar.txtLimitLog_Min": "Minimum",
+ "SSE.Controllers.Toolbar.txtMatrix_1_2": "1x2 Empty Matrix",
+ "SSE.Controllers.Toolbar.txtMatrix_1_3": "1x3 Empty Matrix",
+ "SSE.Controllers.Toolbar.txtMatrix_2_1": "2x1 Empty Matrix",
+ "SSE.Controllers.Toolbar.txtMatrix_2_2": "2x2 Empty Matrix",
+ "SSE.Controllers.Toolbar.txtMatrix_2_2_DLineBracket": "Empty Matrix with Brackets",
+ "SSE.Controllers.Toolbar.txtMatrix_2_2_LineBracket": "Empty Matrix with Brackets",
+ "SSE.Controllers.Toolbar.txtMatrix_2_2_RoundBracket": "Empty Matrix with Brackets",
+ "SSE.Controllers.Toolbar.txtMatrix_2_2_SquareBracket": "Empty Matrix with Brackets",
+ "SSE.Controllers.Toolbar.txtMatrix_2_3": "2x3 Empty Matrix",
+ "SSE.Controllers.Toolbar.txtMatrix_3_1": "3x1 Empty Matrix",
+ "SSE.Controllers.Toolbar.txtMatrix_3_2": "3x2 Empty Matrix",
+ "SSE.Controllers.Toolbar.txtMatrix_3_3": "3x3 Empty Matrix",
+ "SSE.Controllers.Toolbar.txtMatrix_Dots_Baseline": "Baseline Dots",
+ "SSE.Controllers.Toolbar.txtMatrix_Dots_Center": "Midline Dots",
+ "SSE.Controllers.Toolbar.txtMatrix_Dots_Diagonal": "Diagonal Dots",
+ "SSE.Controllers.Toolbar.txtMatrix_Dots_Vertical": "Vertical Dots",
+ "SSE.Controllers.Toolbar.txtMatrix_Flat_Round": "Sparse Matrix",
+ "SSE.Controllers.Toolbar.txtMatrix_Flat_Square": "Sparse Matrix",
+ "SSE.Controllers.Toolbar.txtMatrix_Identity_2": "2x2 Identity Matrix",
+ "SSE.Controllers.Toolbar.txtMatrix_Identity_2_NoZeros": "3x3 Identity Matrix",
+ "SSE.Controllers.Toolbar.txtMatrix_Identity_3": "3x3 Identity Matrix",
+ "SSE.Controllers.Toolbar.txtMatrix_Identity_3_NoZeros": "3x3 Identity Matrix",
+ "SSE.Controllers.Toolbar.txtOperator_ArrowD_Bot": "Right-Left Arrow Below",
+ "SSE.Controllers.Toolbar.txtOperator_ArrowD_Top": "Right-Left Arrow Above",
+ "SSE.Controllers.Toolbar.txtOperator_ArrowL_Bot": "Leftwards Arrow Below",
+ "SSE.Controllers.Toolbar.txtOperator_ArrowL_Top": "Leftwards Arrow Above",
+ "SSE.Controllers.Toolbar.txtOperator_ArrowR_Bot": "Rightwards Arrow Below",
+ "SSE.Controllers.Toolbar.txtOperator_ArrowR_Top": "Rightwards Arrow Above",
+ "SSE.Controllers.Toolbar.txtOperator_ColonEquals": "Colon Equal",
+ "SSE.Controllers.Toolbar.txtOperator_Custom_1": "Yields",
+ "SSE.Controllers.Toolbar.txtOperator_Custom_2": "Delta Yields",
+ "SSE.Controllers.Toolbar.txtOperator_Definition": "Equal to By Definition",
+ "SSE.Controllers.Toolbar.txtOperator_DeltaEquals": "Delta Equal To",
+ "SSE.Controllers.Toolbar.txtOperator_DoubleArrowD_Bot": "Right-Left Arrow Below",
+ "SSE.Controllers.Toolbar.txtOperator_DoubleArrowD_Top": "Right-Left Arrow Above",
+ "SSE.Controllers.Toolbar.txtOperator_DoubleArrowL_Bot": "Leftwards Arrow Below",
+ "SSE.Controllers.Toolbar.txtOperator_DoubleArrowL_Top": "Leftwards Arrow Above",
+ "SSE.Controllers.Toolbar.txtOperator_DoubleArrowR_Bot": "Rightwards Arrow Below",
+ "SSE.Controllers.Toolbar.txtOperator_DoubleArrowR_Top": "Rightwards Arrow Above",
+ "SSE.Controllers.Toolbar.txtOperator_EqualsEquals": "Equal Equal",
+ "SSE.Controllers.Toolbar.txtOperator_MinusEquals": "Minus Equal",
+ "SSE.Controllers.Toolbar.txtOperator_PlusEquals": "Plus Equal",
+ "SSE.Controllers.Toolbar.txtOperator_UnitOfMeasure": "Measured By",
+ "SSE.Controllers.Toolbar.txtRadicalCustom_1": "Radical",
+ "SSE.Controllers.Toolbar.txtRadicalCustom_2": "Radical",
+ "SSE.Controllers.Toolbar.txtRadicalRoot_2": "Square Root With Degree",
+ "SSE.Controllers.Toolbar.txtRadicalRoot_3": "Cubic Root",
+ "SSE.Controllers.Toolbar.txtRadicalRoot_n": "Radical With Degree",
+ "SSE.Controllers.Toolbar.txtRadicalSqrt": "Square Root",
+ "SSE.Controllers.Toolbar.txtScriptCustom_1": "Script",
+ "SSE.Controllers.Toolbar.txtScriptCustom_2": "Script",
+ "SSE.Controllers.Toolbar.txtScriptCustom_3": "Script",
+ "SSE.Controllers.Toolbar.txtScriptCustom_4": "Script",
+ "SSE.Controllers.Toolbar.txtScriptSub": "Subscript",
+ "SSE.Controllers.Toolbar.txtScriptSubSup": "Subscript-Superscript",
+ "SSE.Controllers.Toolbar.txtScriptSubSupLeft": "LeftSubscript-Superscript",
+ "SSE.Controllers.Toolbar.txtScriptSup": "Superscript",
+ "SSE.Controllers.Toolbar.txtSymbol_about": "Approximately",
+ "SSE.Controllers.Toolbar.txtSymbol_additional": "Complement",
+ "SSE.Controllers.Toolbar.txtSymbol_aleph": "Alef",
+ "SSE.Controllers.Toolbar.txtSymbol_alpha": "Alpha",
+ "SSE.Controllers.Toolbar.txtSymbol_approx": "Almost Equal To",
+ "SSE.Controllers.Toolbar.txtSymbol_ast": "Asterisk Operator",
+ "SSE.Controllers.Toolbar.txtSymbol_beta": "Beta",
+ "SSE.Controllers.Toolbar.txtSymbol_beth": "Bet",
+ "SSE.Controllers.Toolbar.txtSymbol_bullet": "Bullet Operator",
+ "SSE.Controllers.Toolbar.txtSymbol_cap": "Intersection",
+ "SSE.Controllers.Toolbar.txtSymbol_cbrt": "Cube Root",
+ "SSE.Controllers.Toolbar.txtSymbol_cdots": "Midline Horizontal Ellipsis",
+ "SSE.Controllers.Toolbar.txtSymbol_celsius": "Degrees Celsius",
+ "SSE.Controllers.Toolbar.txtSymbol_chi": "Chi",
+ "SSE.Controllers.Toolbar.txtSymbol_cong": "Approximately Equal To",
+ "SSE.Controllers.Toolbar.txtSymbol_cup": "Union",
+ "SSE.Controllers.Toolbar.txtSymbol_ddots": "Down Right Diagonal Ellipsis",
+ "SSE.Controllers.Toolbar.txtSymbol_degree": "Degrees",
+ "SSE.Controllers.Toolbar.txtSymbol_delta": "Delta",
+ "SSE.Controllers.Toolbar.txtSymbol_div": "Division Sign",
+ "SSE.Controllers.Toolbar.txtSymbol_downarrow": "Down Arrow",
+ "SSE.Controllers.Toolbar.txtSymbol_emptyset": "Empty Set",
+ "SSE.Controllers.Toolbar.txtSymbol_epsilon": "Epsilon",
+ "SSE.Controllers.Toolbar.txtSymbol_equals": "Equal",
+ "SSE.Controllers.Toolbar.txtSymbol_equiv": "Identical To",
+ "SSE.Controllers.Toolbar.txtSymbol_eta": "Eta",
+ "SSE.Controllers.Toolbar.txtSymbol_exists": "There Exist",
+ "SSE.Controllers.Toolbar.txtSymbol_factorial": "Factorial",
+ "SSE.Controllers.Toolbar.txtSymbol_fahrenheit": "Degrees Fahrenheit",
+ "SSE.Controllers.Toolbar.txtSymbol_forall": "For All",
+ "SSE.Controllers.Toolbar.txtSymbol_gamma": "Gamma",
+ "SSE.Controllers.Toolbar.txtSymbol_geq": "Greater Than or Equal To",
+ "SSE.Controllers.Toolbar.txtSymbol_gg": "Much Greater Than",
+ "SSE.Controllers.Toolbar.txtSymbol_greater": "Greater Than",
+ "SSE.Controllers.Toolbar.txtSymbol_in": "Element Of",
+ "SSE.Controllers.Toolbar.txtSymbol_inc": "Increment",
+ "SSE.Controllers.Toolbar.txtSymbol_infinity": "Infinity",
+ "SSE.Controllers.Toolbar.txtSymbol_iota": "Iota",
+ "SSE.Controllers.Toolbar.txtSymbol_kappa": "Kappa",
+ "SSE.Controllers.Toolbar.txtSymbol_lambda": "Lambda",
+ "SSE.Controllers.Toolbar.txtSymbol_leftarrow": "Left Arrow",
+ "SSE.Controllers.Toolbar.txtSymbol_leftrightarrow": "Left-Right Arrow",
+ "SSE.Controllers.Toolbar.txtSymbol_leq": "Less Than or Equal To",
+ "SSE.Controllers.Toolbar.txtSymbol_less": "Less Than",
+ "SSE.Controllers.Toolbar.txtSymbol_ll": "Much Less Than",
+ "SSE.Controllers.Toolbar.txtSymbol_minus": "Minus",
+ "SSE.Controllers.Toolbar.txtSymbol_mp": "Minus Plus",
+ "SSE.Controllers.Toolbar.txtSymbol_mu": "Mu",
+ "SSE.Controllers.Toolbar.txtSymbol_nabla": "Nabla",
+ "SSE.Controllers.Toolbar.txtSymbol_neq": "Not Equal To",
+ "SSE.Controllers.Toolbar.txtSymbol_ni": "Contains as Member",
+ "SSE.Controllers.Toolbar.txtSymbol_not": "Not Sign",
+ "SSE.Controllers.Toolbar.txtSymbol_notexists": "There Does Not Exist",
+ "SSE.Controllers.Toolbar.txtSymbol_nu": "Nu",
+ "SSE.Controllers.Toolbar.txtSymbol_o": "Omicron",
+ "SSE.Controllers.Toolbar.txtSymbol_omega": "Omega",
+ "SSE.Controllers.Toolbar.txtSymbol_partial": "Partial Differential",
+ "SSE.Controllers.Toolbar.txtSymbol_percent": "Percentage",
+ "SSE.Controllers.Toolbar.txtSymbol_phi": "Phi",
+ "SSE.Controllers.Toolbar.txtSymbol_pi": "Pi",
+ "SSE.Controllers.Toolbar.txtSymbol_plus": "Plus",
+ "SSE.Controllers.Toolbar.txtSymbol_pm": "Plus Minus",
+ "SSE.Controllers.Toolbar.txtSymbol_propto": "Proportional To",
+ "SSE.Controllers.Toolbar.txtSymbol_psi": "Psi",
+ "SSE.Controllers.Toolbar.txtSymbol_qdrt": "Fourth Root",
+ "SSE.Controllers.Toolbar.txtSymbol_qed": "End of Proof",
+ "SSE.Controllers.Toolbar.txtSymbol_rddots": "Up Right Diagonal Ellipsis",
+ "SSE.Controllers.Toolbar.txtSymbol_rho": "Rho",
+ "SSE.Controllers.Toolbar.txtSymbol_rightarrow": "Right Arrow",
+ "SSE.Controllers.Toolbar.txtSymbol_sigma": "Sigma",
+ "SSE.Controllers.Toolbar.txtSymbol_sqrt": "Radical Sign",
+ "SSE.Controllers.Toolbar.txtSymbol_tau": "Tau",
+ "SSE.Controllers.Toolbar.txtSymbol_therefore": "Therefore",
+ "SSE.Controllers.Toolbar.txtSymbol_theta": "Theta",
+ "SSE.Controllers.Toolbar.txtSymbol_times": "Multiplication Sign",
+ "SSE.Controllers.Toolbar.txtSymbol_uparrow": "Up Arrow",
+ "SSE.Controllers.Toolbar.txtSymbol_upsilon": "Upsilon",
+ "SSE.Controllers.Toolbar.txtSymbol_varepsilon": "Epsilon Variant",
+ "SSE.Controllers.Toolbar.txtSymbol_varphi": "Phi Variant",
+ "SSE.Controllers.Toolbar.txtSymbol_varpi": "Pi Variant",
+ "SSE.Controllers.Toolbar.txtSymbol_varrho": "Rho Variant",
+ "SSE.Controllers.Toolbar.txtSymbol_varsigma": "Sigma Variant",
+ "SSE.Controllers.Toolbar.txtSymbol_vartheta": "Theta Variant",
+ "SSE.Controllers.Toolbar.txtSymbol_vdots": "Vertical Ellipsis",
+ "SSE.Controllers.Toolbar.txtSymbol_xsi": "Xi",
+ "SSE.Controllers.Toolbar.txtSymbol_zeta": "Zeta",
"SSE.Views.AutoFilterDialog.btnCustomFilter": "Custom Filter",
"SSE.Views.AutoFilterDialog.cancelButtonText": "Cancel",
"SSE.Views.AutoFilterDialog.okButtonText": "OK",
@@ -1066,6 +1464,7 @@
"SSE.Views.Toolbar.tipIncDecimal": "Increase Decimal",
"SSE.Views.Toolbar.tipIncFont": "Increment font size",
"SSE.Views.Toolbar.tipInsertChart": "Insert Chart",
+ "SSE.Views.Toolbar.tipInsertEquation": "Insert Equation",
"SSE.Views.Toolbar.tipInsertHyperlink": "Add Hyperlink",
"SSE.Views.Toolbar.tipInsertImage": "Insert Picture",
"SSE.Views.Toolbar.tipInsertOpt": "Insert Cells",
diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/math.png b/apps/spreadsheeteditor/main/resources/img/toolbar/math.png
new file mode 100644
index 000000000..173efd6f9
Binary files /dev/null and b/apps/spreadsheeteditor/main/resources/img/toolbar/math.png differ
diff --git a/apps/spreadsheeteditor/main/resources/img/toolbar/math@2x.png b/apps/spreadsheeteditor/main/resources/img/toolbar/math@2x.png
new file mode 100644
index 000000000..c3ca01890
Binary files /dev/null and b/apps/spreadsheeteditor/main/resources/img/toolbar/math@2x.png differ
diff --git a/apps/spreadsheeteditor/main/resources/less/toolbar.less b/apps/spreadsheeteditor/main/resources/less/toolbar.less
index 568bcb470..7b060baac 100644
--- a/apps/spreadsheeteditor/main/resources/less/toolbar.less
+++ b/apps/spreadsheeteditor/main/resources/less/toolbar.less
@@ -253,3 +253,8 @@
margin-bottom: -2px;
}
}
+
+.item-equation {
+ border: 1px solid @gray;
+ .background-ximage('@{app-image-path}/toolbar/math.png', '@{app-image-path}/toolbar/math@2x.png', 1500px);
+}