Preliminary additions

This commit is contained in:
Jacob
2017-07-15 19:54:23 +01:00
parent 398f8a8a2a
commit be92ef224c
6 changed files with 48 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
<template name="buff">
<div class="item-slot">
<div class="item inventoryItem layout horizontal center">
<div class="itemName flex">
{{name}}
</div>
</div>
</div>
</template>

View File

@@ -0,0 +1,5 @@
Template.buff.helpers({
name: function() {
return this.name
}
})

View File

@@ -0,0 +1,14 @@
<template name="buffViewList">
{{if buffs.count}}
<paper-material class="card">
<div class="top white paper-font-subhead">
Conditions
</div>
<div flex class="bottom list">
{{#each buffs}}
{{>buff}}
{{/each}}
</div>
</paper-material>
{{/if}}
</template>

View File

@@ -0,0 +1,12 @@
Template.buffViewList.helpers({
buffs: function(){
var selector = {
"parent.id": this.parentId,
"charId": this.charId,
};
if (this.parentGroup){
selector["parent.group"] = this.parentGroup;
}
return Buffs.find(selector);
}
});

View File

@@ -42,6 +42,8 @@
</div>
</paper-material>
</div>
<!--Condtions-->
<!-- { { buffViewList } } -->
<!--Skills-->
<div>
<paper-material class="card">

View File

@@ -1,3 +1,9 @@
Template.stats.helpers({
buffs: function() {
return Buffs.find({charId: this._id}, {sort: {name: 1}});
}
})
Template.stats.events({
"click .stat-card": function(event, instance){
var charId = instance.data._id;