1
Fork 0

Add the support of Tablesorter to the website.

master
vonavi 2014-03-04 21:27:57 +02:00
parent 4dbb2140e6
commit b89c7ae363
4 changed files with 75 additions and 2 deletions

View File

@ -1,5 +1,5 @@
/* Fix the position of chess board while scrolling */
$(function() {
/* Fix the position of chess board while scrolling */
if (obj = $('#GameWrapper')) {
obj.affix({
offset: {
@ -8,7 +8,12 @@ $(function() {
}
}
})
}
};
/* Sort a tournament table with tablesorter */
$('.tablesorter').tablesorter({
widgets: ['zebra']
});
})
/* Stylize pgn4web elements by Bootstrap */

View File

@ -0,0 +1,63 @@
/* 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: 2px;
}
tbody > tr {
> .score, > .diagonal {
min-width: 25px;
text-align: center;
}
> .diagonal {
background: black !important;
}
}
}

View File

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

View File

@ -35,6 +35,10 @@
{% javascript bootstrap %}
{% javascript holder %}
<!-- Tablesorter jQuery plugin -->
{% javascript jquery.tablesorter %}
{% javascript jquery.metadata %}
<!-- Custom JavaScript based on Bootstrap and jQuery -->
{% javascript custom %}
</body>