diff --git a/apps/documenteditor/mobile/app/controller/Main.js b/apps/documenteditor/mobile/app/controller/Main.js index 835009461..35934d470 100644 --- a/apps/documenteditor/mobile/app/controller/Main.js +++ b/apps/documenteditor/mobile/app/controller/Main.js @@ -608,6 +608,7 @@ define([ if (me.api) { me.api.Resize(); me.api.zoomFitToWidth(); + me.api.asc_GetDefaultTableStyles && _.defer(function () {me.api.asc_GetDefaultTableStyles()}); } me.applyLicense(); diff --git a/apps/documenteditor/mobile/app/controller/add/AddTable.js b/apps/documenteditor/mobile/app/controller/add/AddTable.js index e83918cc4..a27d3f8a4 100644 --- a/apps/documenteditor/mobile/app/controller/add/AddTable.js +++ b/apps/documenteditor/mobile/app/controller/add/AddTable.js @@ -83,15 +83,6 @@ define([ }, initEvents: function () { - var me = this; - - if (!_initDefaultStyles) { - _initDefaultStyles = true; - _styles = []; - - me.api.asc_GetDefaultTableStyles(); - } - $('#add-table li').single('click', _.buffered(this.onStyleClick, 100, this)); }, @@ -178,6 +169,11 @@ define([ // API handlers onApiInitTemplates: function(templates) { + if (!_initDefaultStyles) { + _initDefaultStyles = true; + _styles = []; + } + if (_styles.length < 1) { _.each(templates, function(template){ _styles.push({ diff --git a/apps/presentationeditor/mobile/app/controller/Main.js b/apps/presentationeditor/mobile/app/controller/Main.js index 22f2ded06..d47ed7ac6 100644 --- a/apps/presentationeditor/mobile/app/controller/Main.js +++ b/apps/presentationeditor/mobile/app/controller/Main.js @@ -553,6 +553,7 @@ define([ if (me.api) { me.api.Resize(); me.api.zoomFitToPage(); + me.api.asc_GetDefaultTableStyles && _.defer(function () {me.api.asc_GetDefaultTableStyles()}); } me.applyLicense(); diff --git a/apps/presentationeditor/mobile/app/controller/add/AddTable.js b/apps/presentationeditor/mobile/app/controller/add/AddTable.js index a5fd03a02..0fc92de81 100644 --- a/apps/presentationeditor/mobile/app/controller/add/AddTable.js +++ b/apps/presentationeditor/mobile/app/controller/add/AddTable.js @@ -76,13 +76,6 @@ define([ initEvents: function () { var me = this; - if (!_initDefaultStyles) { - _initDefaultStyles = true; - _styles = []; - - me.api.asc_GetDefaultTableStyles && me.api.asc_GetDefaultTableStyles(); - } - $('#add-table li').single('click', _.buffered(me.onStyleClick, 100, me)); }, @@ -165,6 +158,10 @@ define([ // API handlers onApiInitTemplates: function(templates){ + if (!_initDefaultStyles) { + _initDefaultStyles = true; + _styles = []; + } if (_styles.length < 1) { _.each(templates, function(template){ _styles.push({