From aff2f1f438d85d952fb0ee8a86f8fdfc752f582c Mon Sep 17 00:00:00 2001 From: Jacob Date: Thu, 20 Jul 2017 16:18:15 +0100 Subject: [PATCH] Parties are now sorted in both character lists. --- rpg-docs/client/views/characterList/characterList.js | 5 ++++- rpg-docs/client/views/characterList/characterSideList.js | 6 ++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/rpg-docs/client/views/characterList/characterList.js b/rpg-docs/client/views/characterList/characterList.js index e35a5571..5bdee54b 100644 --- a/rpg-docs/client/views/characterList/characterList.js +++ b/rpg-docs/client/views/characterList/characterList.js @@ -7,7 +7,10 @@ Template.characterList.helpers({ ); }, parties() { - return Parties.find({owner: Meteor.userId()}); + return Parties.find( + {owner: Meteor.userId()}, + {sort: {name: 1}}, + ); }, charactersInParty(partyId) { var userId = Meteor.userId(); diff --git a/rpg-docs/client/views/characterList/characterSideList.js b/rpg-docs/client/views/characterList/characterSideList.js index 18e4e800..d27d0941 100644 --- a/rpg-docs/client/views/characterList/characterSideList.js +++ b/rpg-docs/client/views/characterList/characterSideList.js @@ -5,8 +5,10 @@ Template.characterSideList.onCreated(function() { Template.characterSideList.helpers({ parties() { - var userId = Meteor.userId(); - return Parties.find({owner: userId}); + return Parties.find( + {owner: Meteor.userId()}, + {sort: {name: 1}}, + ); }, charactersInParty() { var userId = Meteor.userId();