diff options
-rw-r--r-- | http/_res/ranking.js | 6 | ||||
-rw-r--r-- | templates/ranking.html | 15 |
2 files changed, 20 insertions, 1 deletions
diff --git a/http/_res/ranking.js b/http/_res/ranking.js index c493ea3..3b116d6 100644 --- a/http/_res/ranking.js +++ b/http/_res/ranking.js @@ -53,7 +53,7 @@ var ranking = { readHash : function(force) { var params = ranking.parseHash(location.hash); - var allParams = ['age', 'gender', 'region', 'name', 'page', 'pagesize']; + var allParams = ['age', 'gender', 'region', 'name', 'page', 'pagesize', 'club']; var paramsChanged = false; if (force) { paramsChanged = true; @@ -107,6 +107,10 @@ var ranking = { if (row['player'].trim().toLowerCase().search(value.join('')) == -1) { hidden = true; } + } else if (param == 'club') { + if (row['club'].trim().toLowerCase().search(value.join('')) == -1) { + hidden = true; + } } else if (param.substr(0, 4) != 'page') { if (value.indexOf(row[param].trim()) == -1) { hidden = true; diff --git a/templates/ranking.html b/templates/ranking.html index 9a6d345..b2736a1 100644 --- a/templates/ranking.html +++ b/templates/ranking.html @@ -84,6 +84,21 @@ </div> </form> </div> + <div class="form-group"> + <form action="javascript:void(0)"> + <div class="input-group" role="group"> + <div class="input-group-addon">Klub</div> + <input type="text" class="form-control" data-filter-field="club" /> + <div class="input-group-btn"> + <button type="submit" class="btn btn-default" data-filter-action="club" + aria-label="Filtruj po klubie"> + <i class="glyphicon glyphicon-search"></i> + </button> + <button type="button" class="btn btn-default" data-clear="club">wyczyść</button> + </div> + </div> + </form> + </div> </div> </div> </div> |