From b09a58dbe99c07e0519f5ad87fffa387e26071c6 Mon Sep 17 00:00:00 2001 From: Kirk Scheibelhut Date: Wed, 3 Jul 2019 17:10:27 -0700 Subject: [PATCH] Allow for filtering by more than just Elo 1300+ --- js/client-rooms.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/js/client-rooms.js b/js/client-rooms.js index 2ae744cef..1f6d64dc6 100644 --- a/js/client-rooms.js +++ b/js/client-rooms.js @@ -118,13 +118,14 @@ title: 'Battles', isSideRoom: true, events: { - 'change input[name=elofilter]': 'refresh' + 'change select[name=elofilter]': 'refresh' }, initialize: function () { this.$el.addClass('ps-room-light').addClass('scrollable'); var buf = '

'; - buf += '

'; + buf += '

'; + buf += ''; buf += '

Loading...

'; buf += '
'; @@ -209,8 +210,8 @@ }, refresh: function () { var elofilter = ''; - var $checkbox = this.$('input[name=elofilter]'); - if ($checkbox.is(':checked')) elofilter = ', ' + $checkbox.val(); + var elo = this.$('select[name=elofilter]').val(); + if (elo !== '1000') elofilter = ', ' + elo; app.send('/cmd roomlist ' + this.format + elofilter); this.lastUpdate = new Date().getTime();