From d912430694b13191459f78cc265daa3524990914 Mon Sep 17 00:00:00 2001 From: "Alexander.Trofimov" Date: Mon, 10 Jun 2019 14:06:47 +0300 Subject: [PATCH] [se] Refactoring Return array on asc_onInitEditorStyles --- apps/spreadsheeteditor/main/app/controller/Toolbar.js | 3 +-- apps/spreadsheeteditor/mobile/app/controller/edit/EditCell.js | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/controller/Toolbar.js b/apps/spreadsheeteditor/main/app/controller/Toolbar.js index e7d16358e..9b20db95a 100644 --- a/apps/spreadsheeteditor/main/app/controller/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/controller/Toolbar.js @@ -1614,8 +1614,7 @@ define([ listStyles.menuPicker.store.reset([]); // remove all var mainController = this.getApplication().getController('Main'); - var merged_array = styles.asc_getDocStyles().concat(styles.asc_getDefaultStyles()); - _.each(merged_array, function(style){ + _.each(styles, function(style){ listStyles.menuPicker.store.add({ imageUrl: style.asc_getImage(), name : style.asc_getName(), diff --git a/apps/spreadsheeteditor/mobile/app/controller/edit/EditCell.js b/apps/spreadsheeteditor/mobile/app/controller/edit/EditCell.js index 7ed84eb0c..a8bc562c4 100644 --- a/apps/spreadsheeteditor/mobile/app/controller/edit/EditCell.js +++ b/apps/spreadsheeteditor/mobile/app/controller/edit/EditCell.js @@ -361,9 +361,7 @@ define([ onApiInitEditorStyles: function(styles){ window.styles_loaded = false; - _cellStyles = styles.asc_getDefaultStyles().concat(styles.asc_getDocStyles()); - - this.getView('EditCell').renderStyles(_cellStyles); + this.getView('EditCell').renderStyles(styles); window.styles_loaded = true; },