Replaced effects in-line editing with edit dialogs

Closes #41
This commit is contained in:
Stefan Zermatten
2017-05-10 16:39:36 +02:00
parent b591c66dd5
commit e7bcc2224c
14 changed files with 287 additions and 90 deletions

View File

@@ -2,11 +2,14 @@ Template.effectsViewList.helpers({
effects: function(){
var selector = {
"parent.id": this.parentId,
"charId": this.charId
"charId": this.charId,
};
if (this.parentGroup){
selector["parent.group"] = this.parentGroup;
}
return Effects.find(selector, {fields: {parent: 0}});
let effects = Effects.find(selector, {
fields: {parent: 0},
}).fetch();
return _.sortBy(effects, effect => statOrder[effect.stat] || 999);
}
});