From 880fad0c9f3035cad3c1b46bbbb0a410ab051d9b Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Tue, 23 Aug 2016 11:50:19 +0300 Subject: [PATCH] [DE][SSE] Loading text arts and equations when editors are opened with compact toolbar. --- apps/documenteditor/main/app/controller/Toolbar.js | 5 ++++- apps/documenteditor/main/app/view/Toolbar.js | 5 +++++ apps/spreadsheeteditor/main/app/controller/Toolbar.js | 5 +++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/apps/documenteditor/main/app/controller/Toolbar.js b/apps/documenteditor/main/app/controller/Toolbar.js index 30c7ee918..6bc5b3f3b 100644 --- a/apps/documenteditor/main/app/controller/Toolbar.js +++ b/apps/documenteditor/main/app/controller/Toolbar.js @@ -2189,6 +2189,8 @@ define([ }, fillEquations: function() { + if (!this.toolbar.btnInsertEquation.rendered) return; + var me = this, equationsStore = this.getApplication().getCollection('EquationGroups'); me.equationPickers = []; @@ -2380,8 +2382,9 @@ define([ }, fillTextArt: function() { - var me = this; + if (!this.toolbar.btnInsertText.rendered) return; + var me = this; if (this.toolbar.mnuTextArtPicker) { var models = this.getApplication().getCollection('Common.Collections.TextArt').models, count = this.toolbar.mnuTextArtPicker.store.length; diff --git a/apps/documenteditor/main/app/view/Toolbar.js b/apps/documenteditor/main/app/view/Toolbar.js index 24e0b79f8..96633c18f 100644 --- a/apps/documenteditor/main/app/view/Toolbar.js +++ b/apps/documenteditor/main/app/view/Toolbar.js @@ -1557,6 +1557,11 @@ define([ if (me.listStyles.menuPicker.store.length > 0 && listStylesVisible){ me.listStyles.fillComboView(me.listStyles.menuPicker.getSelectedRec(), true); } + + if (me.btnInsertText.rendered) + DE.getController('Toolbar').fillTextArt(); + if (me.btnInsertEquation.rendered) + DE.getController('Toolbar').fillEquations(); }, 100); } diff --git a/apps/spreadsheeteditor/main/app/controller/Toolbar.js b/apps/spreadsheeteditor/main/app/controller/Toolbar.js index 71a88481b..10c576e35 100644 --- a/apps/spreadsheeteditor/main/app/controller/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/controller/Toolbar.js @@ -1256,6 +1256,9 @@ define([ if (me.toolbar.listStyles.menuPicker.store.length > 0 && listStylesVisible){ me.toolbar.listStyles.fillComboView(me.toolbar.listStyles.menuPicker.getSelectedRec(), true); } + + if (me.toolbar.btnInsertText.rendered) + SSE.getController('Toolbar').fillTextArt(); }, 100); } @@ -2002,6 +2005,8 @@ define([ }, fillTextArt: function() { + if (!this.toolbar.btnInsertText.rendered) return; + var me = this; if (this.toolbar.mnuTextArtPicker) {