]> jfr.im git - irc/unrealircd/unrealircd-webpanel.git/blobdiff - js/unrealircd-admin.js
Allow deletion of entries in server bans list and spamfilter list
[irc/unrealircd/unrealircd-webpanel.git] / js / unrealircd-admin.js
index 81805b4c79015e6b362e6726481fc13e3293de80..978b0266a5337d50faaea1a130ca745b3104c9b3 100644 (file)
@@ -1,6 +1,6 @@
+/* Overview menu selector */
 const tabs = document.querySelectorAll('[data-tab-target]');
 const tabContents = document.querySelectorAll('[data-tab-content]')
-
 tabs.forEach(tab => {
     tab.addEventListener('click', () => {
         const target = document.querySelector(tab.dataset.tabTarget)
@@ -13,4 +13,13 @@ tabs.forEach(tab => {
         tab.classList.add('active');
         target.classList.add('active');
     })
-})
\ No newline at end of file
+})
+
+
+/* TKL (un)select all checkbox */
+function toggle(source) {
+    checkboxes = document.getElementsByName("tklch[]");
+    for (var i = 0, n = checkboxes.length; i < n; i++) {
+        checkboxes[i].checked = source.checked;
+    }
+}
\ No newline at end of file