mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 16:55:05 +02:00
Minor fixes
This commit is contained in:
parent
7be305298a
commit
7bc9a96524
@ -798,6 +798,7 @@ function html_print_select_multiple_filtered(
|
|||||||
|
|
||||||
// Left box.
|
// Left box.
|
||||||
$output .= '<div class="multi-select-container flex-column">';
|
$output .= '<div class="multi-select-container flex-column">';
|
||||||
|
$disable_filters = '';
|
||||||
|
|
||||||
// Filtering.
|
// Filtering.
|
||||||
if (isset($sections['filters']) === true
|
if (isset($sections['filters']) === true
|
||||||
@ -844,6 +845,7 @@ function html_print_select_multiple_filtered(
|
|||||||
$output .= '</div>';
|
$output .= '</div>';
|
||||||
|
|
||||||
$output .= '</div>';
|
$output .= '</div>';
|
||||||
|
$disable_filters = "disableFilters('".$rid."')";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($sections['item-available-filter']) === true
|
if (isset($sections['item-available-filter']) === true
|
||||||
@ -887,7 +889,7 @@ function html_print_select_multiple_filtered(
|
|||||||
'fields' => $available,
|
'fields' => $available,
|
||||||
'name' => 'available-select-'.$rid.'[]',
|
'name' => 'available-select-'.$rid.'[]',
|
||||||
'selected' => '',
|
'selected' => '',
|
||||||
'script' => '',
|
'script' => $disable_filters,
|
||||||
'nothing' => '',
|
'nothing' => '',
|
||||||
'nothing_value' => 0,
|
'nothing_value' => 0,
|
||||||
'return' => true,
|
'return' => true,
|
||||||
|
@ -79,6 +79,14 @@ function filterSelectedItems(txt, id, noneStr) {
|
|||||||
keepSelectClean("selected-select-" + id, noneStr);
|
keepSelectClean("selected-select-" + id, noneStr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function disableFilters(id) {
|
||||||
|
$("#id-group-selected-select-" + id).prop("disabled", true);
|
||||||
|
$("#checkbox-id-group-recursion-selected-select-" + id).prop(
|
||||||
|
"disabled",
|
||||||
|
true
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
function reloadContent(id, url, options, side, noneStr) {
|
function reloadContent(id, url, options, side, noneStr) {
|
||||||
var current;
|
var current;
|
||||||
var opposite;
|
var opposite;
|
||||||
@ -110,7 +118,11 @@ function reloadContent(id, url, options, side, noneStr) {
|
|||||||
// Cleanup previous content.
|
// Cleanup previous content.
|
||||||
$("#" + current).empty();
|
$("#" + current).empty();
|
||||||
|
|
||||||
for (var [value, label] of Object.entries(data)) {
|
let items = Object.entries(data).sort(function(a, b) {
|
||||||
|
return a[1] >= b[1];
|
||||||
|
});
|
||||||
|
|
||||||
|
for (var [value, label] of items) {
|
||||||
if (
|
if (
|
||||||
$("#" + opposite + " option[value=" + value + "]").length == 0 &&
|
$("#" + opposite + " option[value=" + value + "]").length == 0 &&
|
||||||
$("#tmp-" + current + " option[value=" + value + "]").length == 0
|
$("#tmp-" + current + " option[value=" + value + "]").length == 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user