diff options
author | Udo Walter | 2017-05-15 16:50:28 +0200 |
---|---|---|
committer | Udo Walter | 2017-05-15 16:50:28 +0200 |
commit | a29c52a1ceff7e7fe0d93693ed7068fd14703eb4 (patch) | |
tree | 747aac10fcfbe5089c4cc16553481414c5f74cd5 /modules-available/rebootcontrol | |
parent | [statistics_reporting] implemented usecase of permissionmanager in statistics... (diff) | |
download | slx-admin-a29c52a1ceff7e7fe0d93693ed7068fd14703eb4.tar.gz slx-admin-a29c52a1ceff7e7fe0d93693ed7068fd14703eb4.tar.xz slx-admin-a29c52a1ceff7e7fe0d93693ed7068fd14703eb4.zip |
[js_stupidtable] changed one-line code to formatted code;
modified to show sorting arrows on columns and different mouse cursor on hover
Diffstat (limited to 'modules-available/rebootcontrol')
-rw-r--r-- | modules-available/rebootcontrol/clientscript.js | 22 | ||||
-rw-r--r-- | modules-available/rebootcontrol/templates/_page.html | 4 | ||||
-rw-r--r-- | modules-available/rebootcontrol/templates/status.html | 4 |
3 files changed, 4 insertions, 26 deletions
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(' <span class="arrow glyphicon glyphicon-chevron-'+arrow+'"></span>'); - }); -});
\ No newline at end of file diff --git a/modules-available/rebootcontrol/templates/_page.html b/modules-available/rebootcontrol/templates/_page.html index 690316df..0fc3c166 100644 --- a/modules-available/rebootcontrol/templates/_page.html +++ b/modules-available/rebootcontrol/templates/_page.html @@ -18,11 +18,11 @@ </div> <div class="row"> <div class="col-md-12"> - <table class="table table-condensed table-hover" id="dataTable"> + <table class="table table-condensed table-hover stupidtable" id="dataTable"> <thead> <tr> <th data-sort="string">{{lang_client}}</th> - <th data-sort="ipsort">{{lang_ip}}</th> + <th data-sort="ipv4">{{lang_ip}}</th> <th data-sort="string">{{lang_status}}</th> <th data-sort="string">{{lang_session}}</th> <th data-sort="string">{{lang_user}}</th> diff --git a/modules-available/rebootcontrol/templates/status.html b/modules-available/rebootcontrol/templates/status.html index 35bbe42f..c2fdab46 100644 --- a/modules-available/rebootcontrol/templates/status.html +++ b/modules-available/rebootcontrol/templates/status.html @@ -10,11 +10,11 @@ <div data-tm-id="{{taskId}}" data-tm-log="error" data-tm-callback="updateStatus"></div> <div> - <table class="table table-hover" id="dataTable"> + <table class="table table-hover stupidtable" id="dataTable"> <thead> <tr> <th data-sort="string">{{lang_client}}</th> - <th data-sort="ipsort">{{lang_ip}}</th> + <th data-sort="ipv4">{{lang_ip}}</th> <th data-sort="string"> {{lang_status}} </th> |