diff --git a/rpg-docs/client/views/character/stats/buff/buff.html b/rpg-docs/client/views/character/stats/buff/buff.html new file mode 100644 index 00000000..79fd2458 --- /dev/null +++ b/rpg-docs/client/views/character/stats/buff/buff.html @@ -0,0 +1,9 @@ + \ No newline at end of file diff --git a/rpg-docs/client/views/character/stats/buff/buff.js b/rpg-docs/client/views/character/stats/buff/buff.js new file mode 100644 index 00000000..64b5d944 --- /dev/null +++ b/rpg-docs/client/views/character/stats/buff/buff.js @@ -0,0 +1,5 @@ +Template.buff.helpers({ + name: function() { + return this.name + } +}) \ No newline at end of file diff --git a/rpg-docs/client/views/character/stats/buffViewList/buffViewList.html b/rpg-docs/client/views/character/stats/buffViewList/buffViewList.html new file mode 100644 index 00000000..9d58304a --- /dev/null +++ b/rpg-docs/client/views/character/stats/buffViewList/buffViewList.html @@ -0,0 +1,14 @@ + \ No newline at end of file diff --git a/rpg-docs/client/views/character/stats/buffViewList/buffViewList.js b/rpg-docs/client/views/character/stats/buffViewList/buffViewList.js new file mode 100644 index 00000000..a758b138 --- /dev/null +++ b/rpg-docs/client/views/character/stats/buffViewList/buffViewList.js @@ -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); + } +}); diff --git a/rpg-docs/client/views/character/stats/stats.html b/rpg-docs/client/views/character/stats/stats.html index 3a5ce782..642ebafd 100644 --- a/rpg-docs/client/views/character/stats/stats.html +++ b/rpg-docs/client/views/character/stats/stats.html @@ -42,6 +42,8 @@ + +
diff --git a/rpg-docs/client/views/character/stats/stats.js b/rpg-docs/client/views/character/stats/stats.js index f38934b8..d95e1213 100644 --- a/rpg-docs/client/views/character/stats/stats.js +++ b/rpg-docs/client/views/character/stats/stats.js @@ -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;