From 663102718dcde96ff65a7c9d37f4a6fa98658035 Mon Sep 17 00:00:00 2001 From: Thaum Date: Fri, 17 Apr 2015 10:22:46 +0000 Subject: [PATCH] Clicking attacks now brings up the relevant item --- rpg-docs/client/views/character/features/features.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/rpg-docs/client/views/character/features/features.js b/rpg-docs/client/views/character/features/features.js index 4fad3968..15f295a4 100644 --- a/rpg-docs/client/views/character/features/features.js +++ b/rpg-docs/client/views/character/features/features.js @@ -37,7 +37,7 @@ Template.features.events({ template: "featureDialog", data: {featureId: featureId, charId: this._id}, heroId: featureId - }) + }); }, "tap #addAttackButton": function(event){ var charId = this._id; @@ -63,12 +63,12 @@ Template.features.events({ }); }, "tap .attack": function(event){ - var attackId = this._id; - var charId = Template.parentData()._id; + var itemId = this.parent.id; + var charId = this.charId; GlobalUI.setDetail({ - template: "attackDialog", - data: {attackId: attackId, charId: charId}, - heroId: attackId + template: "itemDialog", + data: {itemId: itemId, charId: charId}, + heroId: this._id }); }, "tap .useFeature": function(event){