Make table responsive and fix the sorting of score.

Cette révision appartient à :
vonavi
2015-01-03 13:40:10 +03:00
Parent 3852e43391
révision ae741914ae
3 fichiers modifiés avec 8 ajouts et 3 suppressions

Voir le fichier

Voir le fichier

@@ -12,9 +12,11 @@ layout: default
</div>
<div class="col-xs-12">
<div class="table-responsive">
{% assign table = page.url | remove_first: '/' | append: 'table.html' %}
{% include {{table}} %}
</div>
</div>
<div class="col-xs-12">
{% assign tour-info = page.url | remove_first: '/' | append: 'tour-info.html' %}

Voir le fichier

@@ -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'],