From be92ef224c2170c8b0249a5d29672268f1d89841 Mon Sep 17 00:00:00 2001 From: Jacob Date: Sat, 15 Jul 2017 19:54:23 +0100 Subject: [PATCH] Preliminary additions --- .../client/views/character/stats/buff/buff.html | 9 +++++++++ rpg-docs/client/views/character/stats/buff/buff.js | 5 +++++ .../character/stats/buffViewList/buffViewList.html | 14 ++++++++++++++ .../character/stats/buffViewList/buffViewList.js | 12 ++++++++++++ rpg-docs/client/views/character/stats/stats.html | 2 ++ rpg-docs/client/views/character/stats/stats.js | 6 ++++++ 6 files changed, 48 insertions(+) create mode 100644 rpg-docs/client/views/character/stats/buff/buff.html create mode 100644 rpg-docs/client/views/character/stats/buff/buff.js create mode 100644 rpg-docs/client/views/character/stats/buffViewList/buffViewList.html create mode 100644 rpg-docs/client/views/character/stats/buffViewList/buffViewList.js 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;