diff --git a/www/assets/js/callbacks.js b/www/assets/js/callbacks.js index 549a81c9..4175e5df 100644 --- a/www/assets/js/callbacks.js +++ b/www/assets/js/callbacks.js @@ -288,6 +288,7 @@ Callbacks = { if(tbl.children().length > 1) { $(tbl.children()[1]).remove(); } + $("#loginlog_pagination").remove(); entries.sort(function(a, b) { var x = a.names.join(",").toLowerCase(); var y = b.names.join(",").toLowerCase(); @@ -300,73 +301,25 @@ Callbacks = { } return x == y ? 0 : (x < y ? -1 : 1); }); - for(var i = 0; i < entries.length; i++) { - var tr = $("").appendTo(tbl); - var bantd = $("").appendTo(tr); - if(entries[i].banned) { - bantd.text("Banned"); - tr.addClass("alert alert-error"); + $("#loginlog").data("entries", entries); + if(entries.length > 20) { + var pag = $("
").addClass("pagination span12") + .attr("id", "loginlog_pagination") + .prependTo($("#loginlog")); + var btns = $("