[se] Refactoring
Return array on asc_onInitEditorStyles
This commit is contained in:
parent
964220a560
commit
d912430694
|
@ -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(),
|
||||||
|
|
|
@ -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;
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue