mirror of
https://github.com/pi-hole/web.git
synced 2025-12-24 04:38:28 +00:00
Ensure large table is only loaded when groups are known.
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
@@ -28,6 +28,7 @@ function get_groups()
|
||||
$.post("scripts/pi-hole/php/groups.php", { 'action': 'get_groups', "token":token },
|
||||
function(data) {
|
||||
groups = data.data;
|
||||
initTable();
|
||||
}, "json");
|
||||
}
|
||||
|
||||
@@ -51,8 +52,11 @@ $(document).ready(function() {
|
||||
$('#select').on('change', function() {
|
||||
$("#ip-custom").val("");
|
||||
$("#ip-custom").prop( "disabled" , $( "#select option:selected" ).val() !== "custom");
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
function initTable()
|
||||
{
|
||||
table = $("#adlistsTable").DataTable( {
|
||||
"ajax": {
|
||||
"url": "scripts/pi-hole/php/groups.php",
|
||||
@@ -129,7 +133,7 @@ $(document).ready(function() {
|
||||
return data;
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function addAdlist()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user