[se] Refactoring

Return array on asc_onInitEditorStyles
This commit is contained in:
Alexander.Trofimov 2019-06-10 14:06:47 +03:00
parent 964220a560
commit d912430694
2 changed files with 2 additions and 5 deletions

View file

@ -1614,8 +1614,7 @@ define([
listStyles.menuPicker.store.reset([]); // remove all listStyles.menuPicker.store.reset([]); // remove all
var mainController = this.getApplication().getController('Main'); var mainController = this.getApplication().getController('Main');
var merged_array = styles.asc_getDocStyles().concat(styles.asc_getDefaultStyles()); _.each(styles, function(style){
_.each(merged_array, function(style){
listStyles.menuPicker.store.add({ listStyles.menuPicker.store.add({
imageUrl: style.asc_getImage(), imageUrl: style.asc_getImage(),
name : style.asc_getName(), name : style.asc_getName(),

View file

@ -361,9 +361,7 @@ define([
onApiInitEditorStyles: function(styles){ onApiInitEditorStyles: function(styles){
window.styles_loaded = false; window.styles_loaded = false;
_cellStyles = styles.asc_getDefaultStyles().concat(styles.asc_getDocStyles()); this.getView('EditCell').renderStyles(styles);
this.getView('EditCell').renderStyles(_cellStyles);
window.styles_loaded = true; window.styles_loaded = true;
}, },