diff --git a/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js b/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js index c5f0f1127..2735950b0 100644 --- a/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js +++ b/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js @@ -1243,12 +1243,11 @@ define([ eqlen = this.addEquationMenu(4); } else this.clearEquationMenu(4); - documentHolder.menuEquationSeparator.setVisible(isEquation && eqlen>0); 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; @@ -1561,7 +1560,7 @@ define([ }, initEquationMenu: function() { - if (!me._currentMathObj) return; + if (!this._currentMathObj) return; var me = this, type = me._currentMathObj.get_Type(), value = me._currentMathObj, diff --git a/apps/spreadsheeteditor/main/app/view/DocumentHolder.js b/apps/spreadsheeteditor/main/app/view/DocumentHolder.js index f58c608ef..c2df2c638 100644 --- a/apps/spreadsheeteditor/main/app/view/DocumentHolder.js +++ b/apps/spreadsheeteditor/main/app/view/DocumentHolder.js @@ -558,17 +558,12 @@ define([ value : 'paste' }); - me.menuEquationSeparator = new Common.UI.MenuItem({ - caption : '--' - }); - this.textInShapeMenu = new Common.UI.Menu({ items: [ me.pmiTextCut, me.pmiTextCopy, me.pmiTextPaste, {caption: '--'}, - me.menuEquationSeparator, me.menuParagraphVAlign, me.menuParagraphDirection, me.menuAddHyperlinkShape, 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); +}