restruct code for additional features

This commit is contained in:
6543 2019-09-18 20:42:07 +02:00
parent 286c93ef56
commit 0ba4bb3e26
Signed by: 6543
GPG Key ID: A1CA74D27FD13271
1 changed files with 11 additions and 5 deletions

View File

@ -55,10 +55,16 @@ if(!window.jQuery) {

//use JQuery to bind event on each <th> with a "data-sortt" attribute
$('th').each(function() {
if ($(this)[0].dataset.sortt) $(this).on('click', function(e) {
var data = $(this)[0].dataset.sortt;
data = data.split(",");
sortt(data[0],data[1],data[2]);
});
//if data attribute sortt is set
if ($(this)[0].dataset.sortt) {
//add onclick event
$(this).on('click', function() {
var data = $(this)[0].dataset.sortt;
data = data.split(",");
sortt(data[0],data[1],data[2]);
});
//add arrow to colume
// - place holder -
}
});
}