diff --git a/dashboard-ui/games.html b/dashboard-ui/games.html index c015b18f6f..fd20eed9af 100644 --- a/dashboard-ui/games.html +++ b/dashboard-ui/games.html @@ -99,6 +99,24 @@ +
+ + Players: + + + + + + + + + + + + + +
+
Features: diff --git a/dashboard-ui/scripts/gamespage.js b/dashboard-ui/scripts/gamespage.js index 72750a228b..8453379a20 100644 --- a/dashboard-ui/scripts/gamespage.js +++ b/dashboard-ui/scripts/gamespage.js @@ -99,6 +99,17 @@ reloadItems(page); }); + $('.radioPlayers', this).on('click', function () { + + query.StartIndex = 0; + + var val = this.getAttribute('data-value'); + + query.MinPlayers = val == "all" ? null : val; + + reloadItems(page); + }); + $('.chkStandardFilter', this).on('change', function () { var filterName = this.getAttribute('data-filter'); @@ -197,6 +208,19 @@ }).checkboxradio('refresh'); + $('.radioPlayers', this).each(function () { + + var val = this.getAttribute('data-value'); + + if (val == "all") { + + this.checked = query.MinPlayers == null; + } else { + this.checked = query.MinPlayers == val; + } + + }).checkboxradio('refresh'); + $('.chkStandardFilter', this).each(function () { var filters = "," + (query.Filters || ""); @@ -206,7 +230,6 @@ }).checkboxradio('refresh'); - $('#selectView', this).val(view).selectmenu('refresh'); $('#chkTrailer', this).checked(query.HasTrailer == true).checkboxradio('refresh');