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/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 83c256d72..362db1612 100644 --- a/apps/spreadsheeteditor/main/app/controller/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/controller/Toolbar.js @@ -2054,7 +2054,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/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 @@
- +