diff --git a/apps/common/main/lib/controller/Plugins.js b/apps/common/main/lib/controller/Plugins.js index 9632e386e..05775c87a 100644 --- a/apps/common/main/lib/controller/Plugins.js +++ b/apps/common/main/lib/controller/Plugins.js @@ -204,17 +204,7 @@ define([ arr = []; storePlugins.each(function(item){ var plugin = new Asc.CPlugin(); - plugin.deserialize(item.attributes); - - var variations = item.get('variations'), - variationsArr = []; - variations.forEach(function(itemVar){ - var variation = new Asc.CPluginVariation(); - variation.deserialize(itemVar.attributes); - variationsArr.push(variation); - }); - - plugin.set_Variations(variationsArr); + plugin.deserialize(item.get('original')); item.set('pluginObj', plugin); arr.push(plugin); }); @@ -562,7 +552,8 @@ define([ visible: pluginVisible, groupName: (item.group) ? item.group.name : '', groupRank: (item.group) ? item.group.rank : 0, - minVersion: item.minVersion + minVersion: item.minVersion, + original: item })); } }); diff --git a/apps/documenteditor/forms/app/controller/Plugins.js b/apps/documenteditor/forms/app/controller/Plugins.js index 4e3fbdbe9..8178f6674 100644 --- a/apps/documenteditor/forms/app/controller/Plugins.js +++ b/apps/documenteditor/forms/app/controller/Plugins.js @@ -133,17 +133,7 @@ define([ arr = []; storePlugins.each(function(item){ var plugin = new Asc.CPlugin(); - plugin.deserialize(item.attributes); - - var variations = item.get('variations'), - variationsArr = []; - variations.forEach(function(itemVar){ - var variation = new Asc.CPluginVariation(); - variation.deserialize(itemVar.attributes); - variationsArr.push(variation); - }); - - plugin.set_Variations(variationsArr); + plugin.deserialize(item.get('original')); item.set('pluginObj', plugin); arr.push(plugin); }); @@ -332,7 +322,8 @@ define([ visible: pluginVisible, groupName: (item.group) ? item.group.name : '', groupRank: (item.group) ? item.group.rank : 0, - minVersion: item.minVersion + minVersion: item.minVersion, + original: item })); } });