mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
Multiselect filtered revomed all/common modules select and added switch
This commit is contained in:
parent
9d4eda381b
commit
a642f88364
@ -1575,12 +1575,13 @@ function html_print_select_multiple_modules_filtered(array $data):string
|
|||||||
1 => __('Show all modules'),
|
1 => __('Show all modules'),
|
||||||
];
|
];
|
||||||
|
|
||||||
if (empty($data['commonModulesSwitch']) === false && $data['commonModulesSwitch'] === true) {
|
if (true) {
|
||||||
$output .= html_print_input(
|
$output .= html_print_input(
|
||||||
[
|
[
|
||||||
|
|
||||||
'label' => __('Common/all modules'),
|
'label' => __('Only common modules'),
|
||||||
'type' => 'switch',
|
'type' => 'switch',
|
||||||
|
'value' => 'checked',
|
||||||
'id' => 'filtered-module-show-common-modules-'.$uniqId,
|
'id' => 'filtered-module-show-common-modules-'.$uniqId,
|
||||||
'return' => true,
|
'return' => true,
|
||||||
'onchange' => 'fmModuleChange(\''.$uniqId.'\', '.(int) is_metaconsole().')',
|
'onchange' => 'fmModuleChange(\''.$uniqId.'\', '.(int) is_metaconsole().')',
|
||||||
|
@ -218,17 +218,9 @@ function fmModuleChange(uniqId, isMeta) {
|
|||||||
"#filtered-module-show-common-modules-" + uniqId
|
"#filtered-module-show-common-modules-" + uniqId
|
||||||
).attr("type");
|
).attr("type");
|
||||||
|
|
||||||
var showCommonModules = 0;
|
var showCommonModules = +(
|
||||||
|
$("#filtered-module-show-common-modules-" + uniqId).prop("checked") == false
|
||||||
if (commonSelectorType != "checkbox") {
|
);
|
||||||
showCommonModules = $(
|
|
||||||
"#filtered-module-show-common-modules-" + uniqId
|
|
||||||
).val();
|
|
||||||
} else {
|
|
||||||
showCommonModules = +$(
|
|
||||||
"#filtered-module-show-common-modules-" + uniqId
|
|
||||||
).prop("checked");
|
|
||||||
}
|
|
||||||
|
|
||||||
jQuery.post(
|
jQuery.post(
|
||||||
"ajax.php",
|
"ajax.php",
|
||||||
|
@ -392,7 +392,7 @@ function initialiceLayout(data) {
|
|||||||
widgetId == 14 || widgetId == 2 || widgetId == 23 || widgetId == 16
|
widgetId == 14 || widgetId == 2 || widgetId == 23 || widgetId == 16
|
||||||
? 750
|
? 750
|
||||||
: 450,
|
: 450,
|
||||||
maxHeight: 610,
|
maxHeight: 650,
|
||||||
minHeight: widgetId == 16 ? 450 : 400
|
minHeight: widgetId == 16 ? 450 : 400
|
||||||
},
|
},
|
||||||
onsubmit: {
|
onsubmit: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user