Fix plugins registration

This commit is contained in:
Julia Radzhabova 2022-06-22 21:14:44 +03:00
parent a78dceb1a3
commit 6bd9d991ee
2 changed files with 6 additions and 24 deletions

View file

@ -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
}));
}
});

View file

@ -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
}));
}
});