From ae741914aec9ba936c44059d9a9acb130cff0a3f Mon Sep 17 00:00:00 2001 From: vonavi Date: Sat, 3 Jan 2015 13:40:10 +0300 Subject: [PATCH] Make table responsive and fix the sorting of score. --- .openshift/markers/force_clean_build | 0 _layouts/tournament.html | 6 ++++-- assets/js/custom.js | 5 ++++- 3 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 .openshift/markers/force_clean_build diff --git a/.openshift/markers/force_clean_build b/.openshift/markers/force_clean_build new file mode 100644 index 0000000..e69de29 diff --git a/_layouts/tournament.html b/_layouts/tournament.html index f45fca4..6c39115 100644 --- a/_layouts/tournament.html +++ b/_layouts/tournament.html @@ -12,8 +12,10 @@ layout: default
- {% assign table = page.url | remove_first: '/' | append: 'table.html' %} - {% include {{table}} %} +
+ {% assign table = page.url | remove_first: '/' | append: 'table.html' %} + {% include {{table}} %} +
diff --git a/assets/js/custom.js b/assets/js/custom.js index 25426fb..4598b5b 100644 --- a/assets/js/custom.js +++ b/assets/js/custom.js @@ -3,14 +3,17 @@ $(function() { $.tablesorter.addParser({ id: 'score', format: function(s, table, cell, cellIndex) { + return s.replace(/¼/,'.25'); return s.replace(/½/,'.5'); + return s.replace(/¾/,'.75'); }, type: 'numeric' }); /* Sort a tournament table with tablesorter */ $('.tablesorter th.score').data('sorter', false); - $('.tablesorter th.total').data('sorter', 'score'); + $('.tablesorter th.points').data('sorter', 'score'); + $('.tablesorter th.berger').data('sorter', 'score'); $('.tablesorter').tablesorter({ theme : 'blue', widgets : ['zebra'],