Commit 6ed79dec authored by Julia Radzhabova's avatar Julia Radzhabova

[PE mobile] Fixed display default table styles.

parent 3ea69c7b
......@@ -48,7 +48,8 @@ define([
'use strict';
PE.Controllers.AddTable = Backbone.Controller.extend(_.extend((function() {
var _styles = [];
var _styles = [],
_initDefaultStyles = false;
return {
models: [],
......@@ -75,8 +76,11 @@ define([
initEvents: function () {
var me = this;
if (_styles.length < 1) {
me.api.asc_GetDefaultTableStyles();
if (!_initDefaultStyles) {
_initDefaultStyles = true;
_styles = [];
me.api.asc_GetDefaultTableStyles && me.api.asc_GetDefaultTableStyles();
}
$('#add-table li').single('click', _.buffered(me.onStyleClick, 100, me));
......
......@@ -194,7 +194,7 @@ define([
$layoutNavbar
.find('.center')
.removeClass('categories')
.html(layoutEditors[0].caption);
.html(layoutEditors.length>0 ? layoutEditors[0].caption: '');
} else {
if (isAndroid) {
$layoutNavbar
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment