[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
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(),

View file

@ -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;
},