2014-02-18 18:45:54 +04:00
|
|
|
$(function() {
|
2014-05-21 18:51:45 +04:00
|
|
|
/* Convert score to numeric number for sorting */
|
|
|
|
$.tablesorter.addParser({
|
|
|
|
id: 'score',
|
|
|
|
format: function(s, table, cell, cellIndex) {
|
|
|
|
return s.replace(/½/,'.5');
|
|
|
|
},
|
|
|
|
type: 'numeric'
|
|
|
|
});
|
|
|
|
|
2014-03-04 23:27:57 +04:00
|
|
|
/* Sort a tournament table with tablesorter */
|
2014-05-21 18:51:45 +04:00
|
|
|
$('.tablesorter th.score').data('sorter', false);
|
|
|
|
$('.tablesorter th.total').data('sorter', 'score');
|
2014-03-04 23:27:57 +04:00
|
|
|
$('.tablesorter').tablesorter({
|
2014-03-22 16:31:04 +04:00
|
|
|
theme : 'blue',
|
|
|
|
widgets : ['zebra'],
|
|
|
|
sortReset : true,
|
|
|
|
sortRestart : true
|
2014-03-04 23:27:57 +04:00
|
|
|
});
|
2014-02-18 18:45:54 +04:00
|
|
|
})
|
|
|
|
|
|
|
|
/* Stylize pgn4web elements by Bootstrap */
|
|
|
|
function customFunctionOnPgnGameLoad() {
|
|
|
|
$('#GameSelSelect').addClass('form-control');
|
|
|
|
$('#autoplayButton').click(refreshButtonset);
|
|
|
|
}
|
|
|
|
function customFunctionOnMove() {
|
|
|
|
refreshButtonset();
|
|
|
|
}
|
|
|
|
function refreshButtonset() {
|
|
|
|
$('#GameButtons input').addClass('btn btn-default');
|
|
|
|
}
|