Relocated the buff list to be inline in stats.html

This commit is contained in:
Jacob
2017-08-09 11:38:30 +01:00
parent 0d023e2ba3
commit bce1b85600
4 changed files with 55 additions and 66 deletions

View File

@@ -1,7 +1,18 @@
Template.stats.helpers({
buffs: function() {
return Buffs.find({charId: this._id}, {sort: {name: 1}});
}
conditions: function(){
var selector = {
"charId": this._id,
"type": "inate",
};
return Buffs.find(selector);
},
buffs: function(){
var selector = {
"charId": this._id,
"type": "custom",
};
return Buffs.find(selector);
},
})
Template.stats.events({
@@ -71,4 +82,17 @@ Template.stats.events({
element: event.currentTarget.parentElement.parentElement,
});
},
"click #addCondition": function(event, template){
pushDialogStack({
template: "conditionLibraryDialog",
element: event.currentTarget,
callback: (result) => {
if (!result) {
return;
}
else Meteor.call("giveCondition", this._id, result)
},
//returnElement: () => $(`[data-id='${itemId}']`).get(0),
})
},
});