Buffs are now split into custom buffs and conditions
This commit is contained in:
@@ -18,5 +18,5 @@
|
||||
{{/if}}
|
||||
{{> effectsViewList charId=charId parentId=_id}}
|
||||
{{> attacksViewList charId=charId parentId=_id}}
|
||||
{{> proficienciesViewList charId=charId parentId=_id}}
|
||||
{{> proficiencyViewList charId=charId parentId=_id}}
|
||||
</template>
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
<template name="buffListItem">
|
||||
<div class="item buffListItem layout horizontal center">
|
||||
<div class="flex">
|
||||
{{buff.name}}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -0,0 +1,17 @@
|
||||
Template.buffListItem.helpers({
|
||||
name: function() {
|
||||
return this.buff.name
|
||||
}
|
||||
});
|
||||
|
||||
Template.buffListItem.events({
|
||||
"click .buffListItem": function(event){
|
||||
var buffId = this.buff._id;
|
||||
var charId = this.buff.charId;
|
||||
pushDialogStack({
|
||||
template: "buffDialog",
|
||||
data: {buffId: buffId, charId: charId},
|
||||
element: event.currentTarget,
|
||||
});
|
||||
},
|
||||
});
|
||||
@@ -1,7 +0,0 @@
|
||||
<template name="buffView">
|
||||
<div class="item buffView layout horizontal center">
|
||||
<div class="flex">
|
||||
{{name}}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -1,17 +0,0 @@
|
||||
Template.buffView.helpers({
|
||||
name: function() {
|
||||
return this.name
|
||||
}
|
||||
});
|
||||
|
||||
Template.buffView.events({
|
||||
"click .buffView": function(event){
|
||||
var buffId = this._id;
|
||||
var charId = Template.parentData()._id;
|
||||
pushDialogStack({
|
||||
template: "buffDialog",
|
||||
data: {buffId: buffId, charId: charId},
|
||||
element: event.currentTarget,
|
||||
});
|
||||
},
|
||||
});
|
||||
@@ -8,20 +8,22 @@
|
||||
{{/if}}
|
||||
</div>
|
||||
<div flex class="bottom list">
|
||||
{{#each conditions}}
|
||||
{{>buffView}}
|
||||
{{/each}}
|
||||
|
||||
{{#if buffs.count}}
|
||||
<div class="buffs">
|
||||
<div class="paper-font-title" style="margin-bottom: 8px;">
|
||||
Buffs
|
||||
</div>
|
||||
{{#each buffs}}
|
||||
{{> buffView}}
|
||||
{{/each}}
|
||||
<div class="conditionsList">
|
||||
{{#each conditions}}
|
||||
{{>buffListItem}}
|
||||
{{/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}}
|
||||
{{/if}}
|
||||
<div class="buffsList">
|
||||
{{#each buff in buffs}}
|
||||
{{>buffListItem buff=buff}}
|
||||
{{/each}}
|
||||
</div>
|
||||
</div>
|
||||
</paper-material>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user