buffViewList is now split into "Conditions" and "Buffs"
This commit is contained in:
@@ -4,13 +4,24 @@
|
||||
<div class="top white subhead layout horizontal center">
|
||||
<div class="flex">Conditions</div>
|
||||
{{#if canEditCharacter _id}}
|
||||
<paper-icon-button class="black54" id="addBuff" icon="add"></paper-icon-button>
|
||||
<paper-icon-button class="black54" id="addCondition" icon="add"></paper-icon-button>
|
||||
{{/if}}
|
||||
</div>
|
||||
<div flex class="bottom list">
|
||||
{{#each buffs}}
|
||||
{{#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>
|
||||
{/if}}
|
||||
</div>
|
||||
</paper-material>
|
||||
</div>
|
||||
|
||||
@@ -1,18 +1,22 @@
|
||||
Template.buffViewList.helpers({
|
||||
conditions: function(){
|
||||
var selector = {
|
||||
"charId": this._id,
|
||||
"type": "inate",
|
||||
};
|
||||
return Buffs.find(selector);
|
||||
},
|
||||
buffs: function(){
|
||||
var selector = {
|
||||
// "parent.id": this.parentId,
|
||||
"charId": this._id,
|
||||
"type": "custom",
|
||||
};
|
||||
// if (this.parentGroup){
|
||||
// selector["parent.group"] = this.parentGroup;
|
||||
// }
|
||||
return Buffs.find(selector);
|
||||
}
|
||||
});
|
||||
|
||||
Template.buffViewList.events({
|
||||
"click #addBuff": function(event, template){
|
||||
"click #addCondition": function(event, template){
|
||||
pushDialogStack({
|
||||
template: "conditionLibraryDialog",
|
||||
element: event.currentTarget,
|
||||
|
||||
Reference in New Issue
Block a user