From 297e54cdc216d8a5c9a0725cb5eea2053bd2daa9 Mon Sep 17 00:00:00 2001 From: Thaum Date: Wed, 11 Mar 2015 08:16:39 +0000 Subject: [PATCH] Equipment ordered by color, name --- rpg-docs/client/views/character/inventory/inventory.html | 5 ----- rpg-docs/client/views/character/inventory/inventory.js | 7 ++----- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/rpg-docs/client/views/character/inventory/inventory.html b/rpg-docs/client/views/character/inventory/inventory.html index 92c0993f..e0a37180 100644 --- a/rpg-docs/client/views/character/inventory/inventory.html +++ b/rpg-docs/client/views/character/inventory/inventory.html @@ -30,11 +30,6 @@
{{round equipmentWeight}}lbs
- {{#if armor}} - {{#with armor}} - {{>inventoryItem}} - {{/with}} - {{/if}} {{#each equipment}} {{>inventoryItem}} {{/each}} diff --git a/rpg-docs/client/views/character/inventory/inventory.js b/rpg-docs/client/views/character/inventory/inventory.js index eee57e32..4fe17a5d 100644 --- a/rpg-docs/client/views/character/inventory/inventory.js +++ b/rpg-docs/client/views/character/inventory/inventory.js @@ -7,13 +7,10 @@ Template.inventory.helpers({ return Containers.find({charId: this._id}, {sort: {color: 1, name: 1}}) }, items: function(charId, containerId){ - return Items.find({charId: charId, equipped: false, container: containerId }, {sort: {color: 1, name: 1}}) - }, - armor: function(){ - return Items.findOne({ charId: this._id, equipped: true, equipmentSlot: "armor" }) + return Items.find({charId: charId, equipped: false, container: containerId }, {sort: {color: 1, name: 1}}); }, equipment: function(){ - return Items.find({ charId: this._id, equipped: true, equipmentSlot: {$ne: "armor"} }) + return Items.find({ charId: this._id, equipped: true }, {sort: {color: 1, name: 1}}); }, showAddButtons: function(){ return Template.instance().showAddButtons.get();