From a29c52a1ceff7e7fe0d93693ed7068fd14703eb4 Mon Sep 17 00:00:00 2001 From: Udo Walter Date: Mon, 15 May 2017 16:50:28 +0200 Subject: [js_stupidtable] changed one-line code to formatted code; modified to show sorting arrows on columns and different mouse cursor on hover --- modules-available/rebootcontrol/clientscript.js | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 modules-available/rebootcontrol/clientscript.js (limited to 'modules-available/rebootcontrol/clientscript.js') diff --git a/modules-available/rebootcontrol/clientscript.js b/modules-available/rebootcontrol/clientscript.js deleted file mode 100644 index d3ecbe48..00000000 --- a/modules-available/rebootcontrol/clientscript.js +++ /dev/null @@ -1,22 +0,0 @@ -document.addEventListener("DOMContentLoaded", function() { - var table = $("table"); - table.stupidtable({ - "ipsort":function(a,b){ - var aa = a.split("."); - var bb = b.split("."); - - var resulta = aa[0]*0x1000000 + aa[1]*0x10000 + aa[2]*0x100 + aa[3]*1; - var resultb = bb[0]*0x1000000 + bb[1]*0x10000 + bb[2]*0x100 + bb[3]*1; - - return resulta-resultb; - } - }); - - table.on("aftertablesort", function (event, data) { - var th = $(this).find("th"); - th.find(".arrow").remove(); - var dir = $.fn.stupidtable.dir; - var arrow = data.direction === dir.ASC ? "down" : "up"; - th.eq(data.column).append(' '); - }); -}); \ No newline at end of file -- cgit v1.2.3-55-g7522