From 8ddd046d3ba277355e6101c55273f656cc5c1f7e Mon Sep 17 00:00:00 2001 From: Daniel Barbero Date: Tue, 22 Nov 2022 14:08:40 +0100 Subject: [PATCH] visual error pandora_enterprise#9875 --- pandora_console/include/functions_ui.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index d31a7010f9..49f1971867 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -4003,10 +4003,10 @@ function ui_toggle( // Options. $style = 'overflow:hidden;'; if ($hidden_default) { - $style .= 'height:0;'; + $style .= 'height:0;position:absolute;'; $original = $img_b; } else { - $style .= 'height:auto;'; + $style .= 'height:auto;position:relative;'; $original = $img_a; } @@ -4113,10 +4113,12 @@ function ui_toggle( $output .= ' if (hide_tgl_ctrl_'.$uniqid.") {\n"; $output .= ' hide_tgl_ctrl_'.$uniqid." = 0;\n"; $output .= " $('#tgl_div_".$uniqid."').css('height', 'auto');\n"; + $output .= " $('#tgl_div_".$uniqid."').css('position', 'relative');\n"; $output .= " }\n"; $output .= " else {\n"; $output .= ' hide_tgl_ctrl_'.$uniqid." = 1;\n"; $output .= " $('#tgl_div_".$uniqid."').css('height', 0);\n"; + $output .= " $('#tgl_div_".$uniqid."').css('position', 'absolute');\n"; $output .= " }\n"; $output .= " }\n"; $output .= " });\n"; @@ -4124,12 +4126,14 @@ function ui_toggle( $output .= ' if (hide_tgl_ctrl_'.$uniqid.") {\n"; $output .= ' hide_tgl_ctrl_'.$uniqid." = 0;\n"; $output .= " $('#tgl_div_".$uniqid."').css('height', 'auto');\n"; + $output .= " $('#tgl_div_".$uniqid."').css('position', 'relative');\n"; $output .= " $('#image_".$uniqid."').attr({src: '".$image_a."'});\n"; $output .= " $('#checkbox-".$switch_name."').prop('checked', true);\n"; $output .= " }\n"; $output .= " else {\n"; $output .= ' hide_tgl_ctrl_'.$uniqid." = 1;\n"; $output .= " $('#tgl_div_".$uniqid."').css('height', 0);\n"; + $output .= " $('#tgl_div_".$uniqid."').css('position', 'absolute');\n"; $output .= " $('#image_".$uniqid."').attr({src: '".$image_b."'});\n"; $output .= " $('#checkbox-".$switch_name."').prop('checked', false);\n"; $output .= " }\n";