Buffs/conditions now have a delete button on the list on Stats

This commit is contained in:
Jacob
2017-09-04 20:36:13 +01:00
parent 7b62c82e32
commit 68e1382aed
4 changed files with 26 additions and 2 deletions

View File

@@ -3,5 +3,13 @@
<div class="flex">
{{buff.name}}
</div>
{{#if canEditCharacter buff.charId}}
<paper-icon-button class="deleteButton"
role="button"
tabindex="0"
icon="delete">
</paper-icon-button>
{{/if}}
</div>
</template>
</template>

View File

@@ -14,4 +14,8 @@ Template.buffListItem.events({
element: event.currentTarget,
});
},
});
"tap .deleteButton": function(event){
event.stopPropagation();
Buffs.remove(this.buff._id);
},
});

View File

@@ -3,5 +3,13 @@
<div class="flex">
{{condition.name}}
</div>
{{#if canEditCharacter condition.charId}}
<paper-icon-button class="deleteButton"
role="button"
tabindex="0"
icon="delete">
</paper-icon-button>
{{/if}}
</div>
</template>

View File

@@ -8,4 +8,8 @@ Template.conditionView.events({
element: event.currentTarget,
});
},
"tap .deleteButton": function(event){
event.stopPropagation();
Conditions.remove(this.condition._id);
},
});