From 18e5ab3f212ffcefd28158f84f80d45fd89ad347 Mon Sep 17 00:00:00 2001 From: Jacob Date: Wed, 9 Aug 2017 16:08:19 +0100 Subject: [PATCH] Can now set target of buffs ...to "Self only", "Others only", or "Both". --- .../buffs/customBuffEdit/customBuffEdit.html | 16 ++++++++++++++++ .../buffs/customBuffEdit/customBuffEdit.js | 6 ++++++ .../buffs/customBuffView/customBuffView.js | 1 - 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/rpg-docs/client/views/character/buffs/customBuffEdit/customBuffEdit.html b/rpg-docs/client/views/character/buffs/customBuffEdit/customBuffEdit.html index 5a12d152..92cd8050 100644 --- a/rpg-docs/client/views/character/buffs/customBuffEdit/customBuffEdit.html +++ b/rpg-docs/client/views/character/buffs/customBuffEdit/customBuffEdit.html @@ -4,6 +4,22 @@ +
+ + + + Self only + + + Others only + + + Both + + + +
+ diff --git a/rpg-docs/client/views/character/buffs/customBuffEdit/customBuffEdit.js b/rpg-docs/client/views/character/buffs/customBuffEdit/customBuffEdit.js index aed7d9b9..4941e58d 100644 --- a/rpg-docs/client/views/character/buffs/customBuffEdit/customBuffEdit.js +++ b/rpg-docs/client/views/character/buffs/customBuffEdit/customBuffEdit.js @@ -32,4 +32,10 @@ Template.customBuffEdit.events({ trimStrings: false, }); }), + "iron-select .target-dropdown": function(event){ + var detail = event.originalEvent.detail; + var value = detail.item.getAttribute("name"); + if (value === this.target) return; + CustomBuffs.update(this._id, {$set: {target: value}}); + }, }); diff --git a/rpg-docs/client/views/character/buffs/customBuffView/customBuffView.js b/rpg-docs/client/views/character/buffs/customBuffView/customBuffView.js index c7421820..d1d7fac2 100644 --- a/rpg-docs/client/views/character/buffs/customBuffView/customBuffView.js +++ b/rpg-docs/client/views/character/buffs/customBuffView/customBuffView.js @@ -66,7 +66,6 @@ Template.customBuffView.events({ Proficiencies.insert(temp); }); - popDialogStack(); } }, }); \ No newline at end of file