Fix plugins registration
This commit is contained in:
parent
a78dceb1a3
commit
6bd9d991ee
|
@ -204,17 +204,7 @@ define([
|
||||||
arr = [];
|
arr = [];
|
||||||
storePlugins.each(function(item){
|
storePlugins.each(function(item){
|
||||||
var plugin = new Asc.CPlugin();
|
var plugin = new Asc.CPlugin();
|
||||||
plugin.deserialize(item.attributes);
|
plugin.deserialize(item.get('original'));
|
||||||
|
|
||||||
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);
|
|
||||||
item.set('pluginObj', plugin);
|
item.set('pluginObj', plugin);
|
||||||
arr.push(plugin);
|
arr.push(plugin);
|
||||||
});
|
});
|
||||||
|
@ -562,7 +552,8 @@ define([
|
||||||
visible: pluginVisible,
|
visible: pluginVisible,
|
||||||
groupName: (item.group) ? item.group.name : '',
|
groupName: (item.group) ? item.group.name : '',
|
||||||
groupRank: (item.group) ? item.group.rank : 0,
|
groupRank: (item.group) ? item.group.rank : 0,
|
||||||
minVersion: item.minVersion
|
minVersion: item.minVersion,
|
||||||
|
original: item
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -133,17 +133,7 @@ define([
|
||||||
arr = [];
|
arr = [];
|
||||||
storePlugins.each(function(item){
|
storePlugins.each(function(item){
|
||||||
var plugin = new Asc.CPlugin();
|
var plugin = new Asc.CPlugin();
|
||||||
plugin.deserialize(item.attributes);
|
plugin.deserialize(item.get('original'));
|
||||||
|
|
||||||
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);
|
|
||||||
item.set('pluginObj', plugin);
|
item.set('pluginObj', plugin);
|
||||||
arr.push(plugin);
|
arr.push(plugin);
|
||||||
});
|
});
|
||||||
|
@ -332,7 +322,8 @@ define([
|
||||||
visible: pluginVisible,
|
visible: pluginVisible,
|
||||||
groupName: (item.group) ? item.group.name : '',
|
groupName: (item.group) ? item.group.name : '',
|
||||||
groupRank: (item.group) ? item.group.rank : 0,
|
groupRank: (item.group) ? item.group.rank : 0,
|
||||||
minVersion: item.minVersion
|
minVersion: item.minVersion,
|
||||||
|
original: item
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue