From d912430694b13191459f78cc265daa3524990914 Mon Sep 17 00:00:00 2001 From: "Alexander.Trofimov" Date: Mon, 10 Jun 2019 14:06:47 +0300 Subject: [PATCH 1/4] [se] Refactoring Return array on asc_onInitEditorStyles --- apps/spreadsheeteditor/main/app/controller/Toolbar.js | 3 +-- apps/spreadsheeteditor/mobile/app/controller/edit/EditCell.js | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/controller/Toolbar.js b/apps/spreadsheeteditor/main/app/controller/Toolbar.js index e7d16358e..9b20db95a 100644 --- a/apps/spreadsheeteditor/main/app/controller/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/controller/Toolbar.js @@ -1614,8 +1614,7 @@ define([ listStyles.menuPicker.store.reset([]); // remove all var mainController = this.getApplication().getController('Main'); - var merged_array = styles.asc_getDocStyles().concat(styles.asc_getDefaultStyles()); - _.each(merged_array, function(style){ + _.each(styles, function(style){ listStyles.menuPicker.store.add({ imageUrl: style.asc_getImage(), name : style.asc_getName(), diff --git a/apps/spreadsheeteditor/mobile/app/controller/edit/EditCell.js b/apps/spreadsheeteditor/mobile/app/controller/edit/EditCell.js index 7ed84eb0c..a8bc562c4 100644 --- a/apps/spreadsheeteditor/mobile/app/controller/edit/EditCell.js +++ b/apps/spreadsheeteditor/mobile/app/controller/edit/EditCell.js @@ -361,9 +361,7 @@ define([ onApiInitEditorStyles: function(styles){ window.styles_loaded = false; - _cellStyles = styles.asc_getDefaultStyles().concat(styles.asc_getDocStyles()); - - this.getView('EditCell').renderStyles(_cellStyles); + this.getView('EditCell').renderStyles(styles); window.styles_loaded = true; }, From bc07f3d7488931432ac69b010f24835ee859937d Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Mon, 10 Jun 2019 14:50:12 +0300 Subject: [PATCH 2/4] [SSE] Fix Bug 41802 --- apps/spreadsheeteditor/main/app/controller/Toolbar.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/controller/Toolbar.js b/apps/spreadsheeteditor/main/app/controller/Toolbar.js index 9b20db95a..36c2d7d87 100644 --- a/apps/spreadsheeteditor/main/app/controller/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/controller/Toolbar.js @@ -1450,7 +1450,7 @@ define([ if (_.isUndefined(me.toolbar.mnuTableTemplatePicker)) me.onApiInitTableTemplates(me.api.asc_getTablePictures(formattableinfo)); var store = me.getCollection('TableTemplates'); - me._setTableFormat(store.at(23).get('name')); + me._setTableFormat(me.api.asc_getDefaultTableStyle()); } } @@ -1531,9 +1531,7 @@ define([ picker.on('item:click', function(picker, item, record) { if (me.api) { me._state.tablestylename = null; - if (!record) - record = picker.store.at(23); - me._setTableFormat(record.get('name')); + me._setTableFormat(record ? record.get('name') : me.api.asc_getDefaultTableStyle()); Common.NotificationCenter.trigger('edit:complete', me.toolbar); Common.component.Analytics.trackEvent('ToolBar', 'Table Templates'); From 2e87bd7afa6befc88e10cd8c906bcbab4d343463 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Mon, 10 Jun 2019 16:01:10 +0300 Subject: [PATCH 3/4] [DE][PE] Add tooltips for table styles --- apps/documenteditor/main/app/view/TableSettings.js | 3 ++- apps/presentationeditor/main/app/view/TableSettings.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/documenteditor/main/app/view/TableSettings.js b/apps/documenteditor/main/app/view/TableSettings.js index 648afe5d0..a728cfc1d 100644 --- a/apps/documenteditor/main/app/view/TableSettings.js +++ b/apps/documenteditor/main/app/view/TableSettings.js @@ -721,7 +721,8 @@ define([ arr.push({ imageUrl: template.asc_getImage(), id : Common.UI.getId(), - templateId: template.asc_getId() + templateId: template.asc_getId(), + tip : template.asc_getDisplayName() }); }); self.cmbTableTemplate.menuPicker.store.add(arr); diff --git a/apps/presentationeditor/main/app/view/TableSettings.js b/apps/presentationeditor/main/app/view/TableSettings.js index dce548f59..aa3ba303b 100644 --- a/apps/presentationeditor/main/app/view/TableSettings.js +++ b/apps/presentationeditor/main/app/view/TableSettings.js @@ -690,7 +690,8 @@ define([ arr.push({ imageUrl: template.asc_getImage(), id : Common.UI.getId(), - templateId: template.asc_getId() + templateId: template.asc_getId(), + tip : template.asc_getDisplayName() }); }); self.cmbTableTemplate.menuPicker.store.add(arr); From 0b31165036d3df9782116f2069f1722b7186349c Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Mon, 10 Jun 2019 16:02:36 +0300 Subject: [PATCH 4/4] Fix rev.ae11df6ed3b8a133e92804af86123974fd284d0c (show tooltips in ComboDataView after render or click on item) --- apps/common/main/lib/component/DataView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/common/main/lib/component/DataView.js b/apps/common/main/lib/component/DataView.js index 5f8ccbf99..86f0b0c8b 100644 --- a/apps/common/main/lib/component/DataView.js +++ b/apps/common/main/lib/component/DataView.js @@ -151,7 +151,7 @@ define([ var tip = el.data('bs.tooltip'); if (tip) { - if (tip.dontShow===undefined) + if (tip.dontShow===undefined && el.is(':hover')) tip.dontShow = true; }