diff --git a/apps/common/main/resources/less/combo-dataview.less b/apps/common/main/resources/less/combo-dataview.less index 896e17371..fb4e4ec74 100644 --- a/apps/common/main/resources/less/combo-dataview.less +++ b/apps/common/main/resources/less/combo-dataview.less @@ -350,6 +350,10 @@ position: static; } + .view .dataview, .dropdown-menu { + padding: 1px; + } + .dataview { .item { &:hover { diff --git a/apps/documenteditor/main/app/view/TableSettings.js b/apps/documenteditor/main/app/view/TableSettings.js index cd79c5465..357bd6662 100644 --- a/apps/documenteditor/main/app/view/TableSettings.js +++ b/apps/documenteditor/main/app/view/TableSettings.js @@ -784,9 +784,15 @@ define([ {id: 'menu-table-group-no-name', caption: ' ', templates: []}, ]; - self.mnuTableTemplatePicker.store.models.forEach(function(template) { - groups.filter(function(item){ return item.id == template.attributes.group; })[0].templates.push(template); - }); + if (this._state.beginPreviewStyles) { + this._state.beginPreviewStyles = false; + } + else { + self.mnuTableTemplatePicker.store.each(function(template) { + groups.filter(function(item){ return item.id == template.get('group') ; })[0].templates.push(template); + }); + } + _.each(Templates, function(template){ var tip = template.asc_getDisplayName(); var groupItem = ''; @@ -836,11 +842,7 @@ define([ templates = templates.concat(item.templates); delete item.templates; }); - - if (this._state.beginPreviewStyles) { - this._state.beginPreviewStyles = false; - } - + self.mnuTableTemplatePicker && self.mnuTableTemplatePicker.groups.reset(groups); self.mnuTableTemplatePicker && self.mnuTableTemplatePicker.store.reset(templates); !this._state.currentStyleFound && this.selectCurrentTableStyle(); diff --git a/apps/presentationeditor/main/app/view/TableSettings.js b/apps/presentationeditor/main/app/view/TableSettings.js index 9d13d2e7e..afe4a452d 100644 --- a/apps/presentationeditor/main/app/view/TableSettings.js +++ b/apps/presentationeditor/main/app/view/TableSettings.js @@ -717,9 +717,15 @@ define([ {id: 'menu-table-group-no-name', caption: ' ', templates: []}, ]; - self.mnuTableTemplatePicker.store.models.forEach(function(template) { - groups.filter(function(item){ return item.id == template.attributes.group; })[0].templates.push(template); - }); + if (this._state.beginPreviewStyles) { + this._state.beginPreviewStyles = false; + } + else { + self.mnuTableTemplatePicker.store.each(function(template) { + groups.filter(function(item){ return item.id == template.get('group') ; })[0].templates.push(template); + }); + } + _.each(Templates, function(template){ var tip = template.asc_getDisplayName(); var groupItem = ''; @@ -766,11 +772,7 @@ define([ templates = templates.concat(item.templates); delete item.templates; }); - - if (this._state.beginPreviewStyles) { - this._state.beginPreviewStyles = false; - } - + self.mnuTableTemplatePicker && self.mnuTableTemplatePicker.groups.reset(groups); self.mnuTableTemplatePicker && self.mnuTableTemplatePicker.store.reset(templates); !this._state.currentStyleFound && this.selectCurrentTableStyle();