Preliminary additions
This commit is contained in:
9
rpg-docs/client/views/character/stats/buff/buff.html
Normal file
9
rpg-docs/client/views/character/stats/buff/buff.html
Normal 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>
|
||||||
5
rpg-docs/client/views/character/stats/buff/buff.js
Normal file
5
rpg-docs/client/views/character/stats/buff/buff.js
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
Template.buff.helpers({
|
||||||
|
name: function() {
|
||||||
|
return this.name
|
||||||
|
}
|
||||||
|
})
|
||||||
@@ -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>
|
||||||
@@ -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);
|
||||||
|
}
|
||||||
|
});
|
||||||
@@ -42,6 +42,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</paper-material>
|
</paper-material>
|
||||||
</div>
|
</div>
|
||||||
|
<!--Condtions-->
|
||||||
|
<!-- { { buffViewList } } -->
|
||||||
<!--Skills-->
|
<!--Skills-->
|
||||||
<div>
|
<div>
|
||||||
<paper-material class="card">
|
<paper-material class="card">
|
||||||
|
|||||||
@@ -1,3 +1,9 @@
|
|||||||
|
Template.stats.helpers({
|
||||||
|
buffs: function() {
|
||||||
|
return Buffs.find({charId: this._id}, {sort: {name: 1}});
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
Template.stats.events({
|
Template.stats.events({
|
||||||
"click .stat-card": function(event, instance){
|
"click .stat-card": function(event, instance){
|
||||||
var charId = instance.data._id;
|
var charId = instance.data._id;
|
||||||
|
|||||||
Reference in New Issue
Block a user