mirror of
https://github.com/pi-hole/web.git
synced 2025-12-24 20:55:28 +00:00
update multiselects on other group pages with the same logic
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
This commit is contained in:
@@ -108,7 +108,23 @@ function initTable() {
|
||||
// Select assigned groups
|
||||
sel.val(data.groups);
|
||||
// Initialize multiselect
|
||||
sel.multiselect({ includeSelectAllOption: true });
|
||||
sel.multiselect({
|
||||
includeSelectAllOption: true,
|
||||
buttonContainer: '<div id="container' + data.id + '" class="btn-group"/>',
|
||||
maxHeight: 200,
|
||||
onDropdownShown: function() {
|
||||
var el = $("#container" + data.id);
|
||||
var top = el[0].getBoundingClientRect().top;
|
||||
var bottom = $(window).height() - top - el.height();
|
||||
if (bottom < 200) {
|
||||
el.addClass("dropup");
|
||||
}
|
||||
|
||||
if (bottom > 200) {
|
||||
el.removeClass("dropup");
|
||||
}
|
||||
}
|
||||
});
|
||||
sel.on("change", editAdlist);
|
||||
|
||||
var button =
|
||||
|
||||
@@ -140,7 +140,23 @@ function initTable() {
|
||||
// Select assigned groups
|
||||
sel.val(data.groups);
|
||||
// Initialize multiselect
|
||||
sel.multiselect({ includeSelectAllOption: true });
|
||||
sel.multiselect({
|
||||
includeSelectAllOption: true,
|
||||
buttonContainer: '<div id="container' + data.id + '" class="btn-group"/>',
|
||||
maxHeight: 200,
|
||||
onDropdownShown: function() {
|
||||
var el = $("#container" + data.id);
|
||||
var top = el[0].getBoundingClientRect().top;
|
||||
var bottom = $(window).height() - top - el.height();
|
||||
if (bottom < 200) {
|
||||
el.addClass("dropup");
|
||||
}
|
||||
|
||||
if (bottom > 200) {
|
||||
el.removeClass("dropup");
|
||||
}
|
||||
}
|
||||
});
|
||||
sel.on("change", editDomain);
|
||||
|
||||
var button =
|
||||
|
||||
Reference in New Issue
Block a user