From 49011b72c34268b69f89be3618b619fefdf1fb24 Mon Sep 17 00:00:00 2001 From: AlexeyMatveev686 Date: Mon, 30 Aug 2021 17:59:46 +0300 Subject: [PATCH] Use plugin.deserialize and variatuin.deserialize --- apps/common/main/lib/controller/Plugins.js | 25 ++-------------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/apps/common/main/lib/controller/Plugins.js b/apps/common/main/lib/controller/Plugins.js index 5b63032bd..1c30e57d6 100644 --- a/apps/common/main/lib/controller/Plugins.js +++ b/apps/common/main/lib/controller/Plugins.js @@ -203,34 +203,13 @@ define([ arr = []; storePlugins.each(function(item){ var plugin = new Asc.CPlugin(); - plugin.set_Name(item.get('name')); - plugin.set_Guid(item.get('guid')); - plugin.set_BaseUrl(item.get('baseUrl')); - plugin.set_MinVersion && plugin.set_MinVersion(item.get('minVersion')); + plugin.deserialize(item.attributes); var variations = item.get('variations'), variationsArr = []; variations.forEach(function(itemVar){ var variation = new Asc.CPluginVariation(); - variation.set_Description(itemVar.get('description')); - variation.set_Url(itemVar.get('url')); - variation.set_Icons(itemVar.get('icons')); - variation.set_Visual(itemVar.get('isVisual')); - variation.set_CustomWindow(itemVar.get('isCustomWindow')); - variation.set_System(itemVar.get('isSystem')); - variation.set_Viewer(itemVar.get('isViewer')); - variation.set_EditorsSupport(itemVar.get('EditorsSupport')); - variation.set_Modal(itemVar.get('isModal')); - variation.set_InsideMode(itemVar.get('isInsideMode')); - variation.set_InitDataType(itemVar.get('initDataType')); - variation.set_InitData(itemVar.get('initData')); - variation.set_UpdateOleOnResize(itemVar.get('isUpdateOleOnResize')); - variation.set_Buttons(itemVar.get('buttons')); - variation.set_Size(itemVar.get('size')); - variation.set_InitOnSelectionChanged(itemVar.get('initOnSelectionChanged')); - variation.set_Events(itemVar.get('events')); - variation.set_Help(itemVar.get('help')); - + variation.deserialize(itemVar.attributes); variationsArr.push(variation); });