From 355df433c1b658651dc543fb1d07381e3a8320d0 Mon Sep 17 00:00:00 2001 From: Wruczek Date: Tue, 15 Jan 2019 13:29:39 +0100 Subject: [PATCH] Added a ban list loader, hiding the table until it fully initializes --- src/js/bans.js | 5 +++++ src/private/templates/bans.latte | 9 ++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/js/bans.js b/src/js/bans.js index 5a057ac..ff02e09 100644 --- a/src/js/bans.js +++ b/src/js/bans.js @@ -12,6 +12,11 @@ $(document).ready(function() { language: { url: "https://cdn.datatables.net/plug-ins/1.10.19/i18n/" + DATATABLES_LANGUAGE_NAME + ".json" }, + initComplete: function(settings, json) { + console.log("DataTables Loaded") + $("#banlist-loader").hide() + $("#banlist").show() + } /* TODO: It looks better with the "search" text as an placeholder instead of the label diff --git a/src/private/templates/bans.latte b/src/private/templates/bans.latte index a6bdd2a..6f7de57 100644 --- a/src/private/templates/bans.latte +++ b/src/private/templates/bans.latte @@ -16,6 +16,7 @@ {_"BANS_EMPTY"} {else} + {if $ipbanned !== false} +