1

Move custom.js into directory 'assets'.

This commit is contained in:
vonavi
2014-07-01 15:14:56 +03:00
parent bfae207ecd
commit 4fd6db67d6
2 changed files with 1 additions and 1 deletions

32
assets/js/custom.js Normal file
View File

@@ -0,0 +1,32 @@
$(function() {
/* Convert score to numeric number for sorting */
$.tablesorter.addParser({
id: 'score',
format: function(s, table, cell, cellIndex) {
return s.replace(/½/,'.5');
},
type: 'numeric'
});
/* Sort a tournament table with tablesorter */
$('.tablesorter th.score').data('sorter', false);
$('.tablesorter th.total').data('sorter', 'score');
$('.tablesorter').tablesorter({
theme : 'blue',
widgets : ['zebra'],
sortReset : true,
sortRestart : true
});
})
/* 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');
}