[PE mobile] Fixed display default table styles.

This commit is contained in:
Julia Radzhabova 2016-12-01 14:14:25 +03:00
parent 3ea69c7b7e
commit 6ed79dec7a
2 changed files with 8 additions and 4 deletions

View file

@ -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));

View file

@ -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