1
Fork 0

Improve the look of tournament tables, using the last version of tablesorter.

master
vonavi 2014-03-22 14:31:04 +02:00
parent e62f314ad0
commit ae01cf4d3e
9 changed files with 40 additions and 67 deletions

View File

@ -13,7 +13,10 @@ $(function() {
/* Sort a tournament table with tablesorter */
$('.tablesorter .opponent').addClass('{sorter: false}');
$('.tablesorter').tablesorter({
widgets: ['zebra']
theme : 'blue',
widgets : ['zebra'],
sortReset : true,
sortRestart : true
});
})

View File

@ -1 +1 @@
../vendor/tablesorter/jquery.metadata.js
../vendor/tablesorter/js/jquery.metadata.js

View File

@ -1 +1 @@
../vendor/tablesorter/jquery.tablesorter.js
../vendor/tablesorter/js/jquery.tablesorter.js

View File

@ -0,0 +1,30 @@
/* Tournament table */
table.tournament {
thead > tr > th, thead > tr > td,
tfoot > tr > th, tfoot > tr > td,
tbody > tr > th, tbody > tr > td {
padding: 0;
}
thead > tr > .opponent,
tbody > tr > .score,
tbody > tr > .diagonal {
min-width: 21px;
text-align: center;
}
tbody > tr > .diagonal {
background: black !important;
}
}
/* Tablesorter */
/* Fix the background color of tfoot */
.tablesorter-blue tfoot {
.tablesorter-headerSortUp, .tablesorter-headerSortDown,
.tablesorter-headerAsc, .tablesorter-headerDesc {
background-color: #fff;
}
}

View File

@ -1,63 +0,0 @@
/* Tablesorter */
table.tablesorter {
background-color: #cdcdcd;
border-spacing: 1px;
border-collapse: separate;
thead tr th, tfoot tr th {
background-color: #e6eeee;
border: 1px solid #fff !important;
}
thead tr {
.header {
padding-right: 21px;
background-image: url("/assets/img/tablesorter/bg.gif");
background-repeat: no-repeat;
background-position: center right;
cursor: pointer;
}
.headerSortUp {
background-image: url("/assets/img/tablesorter/asc.gif");
}
.headerSortDown {
background-image: url("/assets/img/tablesorter/desc.gif");
}
.headerSortDown, .headerSortUp {
background-color: #8dbdd8;
}
}
tfoot td, tbody td {
background-color: #fff;
border: none;
}
tbody tr.odd td {
background-color: #f0f0f6;
}
}
/* Tournament table */
table.tournament {
thead > tr > th, thead > tr > td,
tfoot > tr > th, tfoot > tr > td,
tbody > tr > th, tbody > tr > td {
padding: 0;
}
thead > tr > .opponent,
tbody > tr > .score,
tbody > tr > .diagonal {
min-width: 21px;
text-align: center;
}
tbody > tr > .diagonal {
background: black !important;
}
}

View File

@ -0,0 +1 @@
../../vendor/tablesorter/css/theme.blue.css

View File

@ -0,0 +1,2 @@
//= require less/theme.blue
//= require less/table.custom

View File

@ -1,2 +1 @@
//= require less/pgn4web
//= require less/table

View File

@ -8,6 +8,7 @@ layout: default
</div>
<div class="col-xs-12">
{% stylesheet table %}
{% assign table = page.url | remove_first: '/' | append: 'table.html' %}
{% include {{table}} %}
</div>