From 23db6a35c626228fa9fafe0226af0db50ee85af3 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Fri, 30 Aug 2019 16:24:15 +0300 Subject: [PATCH] Refactoring --- apps/documenteditor/main/app/view/TableSettings.js | 3 +-- apps/presentationeditor/main/app/view/TableSettings.js | 3 +-- apps/spreadsheeteditor/main/app/controller/Toolbar.js | 3 +-- apps/spreadsheeteditor/main/app/view/TableSettings.js | 3 +-- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/apps/documenteditor/main/app/view/TableSettings.js b/apps/documenteditor/main/app/view/TableSettings.js index 75821fdcd..9e7bdda98 100644 --- a/apps/documenteditor/main/app/view/TableSettings.js +++ b/apps/documenteditor/main/app/view/TableSettings.js @@ -716,7 +716,6 @@ define([ data[index].set('imageUrl', template.asc_getImage()); }); } else { - self.cmbTableTemplate.menuPicker.store.reset([]); var arr = []; _.each(Templates, function(template){ arr.push({ @@ -726,7 +725,7 @@ define([ tip : template.asc_getDisplayName() }); }); - self.cmbTableTemplate.menuPicker.store.add(arr); + self.cmbTableTemplate.menuPicker.store.reset(arr); } }, diff --git a/apps/presentationeditor/main/app/view/TableSettings.js b/apps/presentationeditor/main/app/view/TableSettings.js index 57b2d22f6..b2fc81434 100644 --- a/apps/presentationeditor/main/app/view/TableSettings.js +++ b/apps/presentationeditor/main/app/view/TableSettings.js @@ -685,7 +685,6 @@ define([ data[index].set('imageUrl', template.asc_getImage()); }); } else { - self.cmbTableTemplate.menuPicker.store.reset([]); var arr = []; _.each(Templates, function(template){ arr.push({ @@ -695,7 +694,7 @@ define([ tip : template.asc_getDisplayName() }); }); - self.cmbTableTemplate.menuPicker.store.add(arr); + self.cmbTableTemplate.menuPicker.store.reset(arr); } }, diff --git a/apps/spreadsheeteditor/main/app/controller/Toolbar.js b/apps/spreadsheeteditor/main/app/controller/Toolbar.js index 24de6a67f..014468c4d 100644 --- a/apps/spreadsheeteditor/main/app/controller/Toolbar.js +++ b/apps/spreadsheeteditor/main/app/controller/Toolbar.js @@ -1631,8 +1631,7 @@ define([ }); }); - store.reset(); - store.add(templates); + store.reset(templates); } this.fillTableTemplates(); diff --git a/apps/spreadsheeteditor/main/app/view/TableSettings.js b/apps/spreadsheeteditor/main/app/view/TableSettings.js index 810f49060..e357a3c01 100644 --- a/apps/spreadsheeteditor/main/app/view/TableSettings.js +++ b/apps/spreadsheeteditor/main/app/view/TableSettings.js @@ -456,7 +456,6 @@ define([ data[index].set('imageUrl', template.asc_getImage()); }); } else { - self.cmbTableTemplate.menuPicker.store.reset([]); var arr = []; _.each(Templates, function(template){ arr.push({ @@ -470,7 +469,7 @@ define([ tip : template.asc_getDisplayName() }); }); - self.cmbTableTemplate.menuPicker.store.add(arr); + self.cmbTableTemplate.menuPicker.store.reset(arr); } },