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,30 +0,0 @@
<template name="buffViewList">
<div>
<paper-material class="card">
<div class="top white subhead layout horizontal center">
<div class="flex">Conditions</div>
{{#if canEditCharacter _id}}
<paper-icon-button class="black54" id="addCondition" icon="add"></paper-icon-button>
{{/if}}
</div>
<div flex class="bottom list">
<div class="conditionsList">
{{#each condition in conditions}}
{{>buffListItem buff=condition}}
{{/each}}
</div>
{{#if totalBuffs.count}}
<div class="layout horizontal">
<div class="paper-font-subhead flex">Buffs</div>
<paper-button class="viewAllBuffsButton"> View All </paper-button>
</div>
{{/if}}
<div class="buffsList">
{{#each buff in buffs}}
{{>buffListItem buff=buff}}
{{/each}}
</div>
</div>
</paper-material>
</div>
</template>

View File

@@ -1,32 +0,0 @@
Template.buffViewList.helpers({
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.buffViewList.events({
"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),
})
},
});