From 829bec59e3093eebc03fa94d397354f33a9a37dc Mon Sep 17 00:00:00 2001 From: Jose Gonzalez Date: Tue, 14 Feb 2023 16:45:27 +0100 Subject: [PATCH 1/5] Fix --- pandora_console/include/functions_ui.php | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index 5b41b5985f..e097fb3db0 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -4231,25 +4231,18 @@ function ui_toggle( $image_a = html_print_image( $img_a, true, - [ - 'style' => 'rotate: 45deg;', - 'class' => 'main_menu_icon', - ], + [ 'style' => 'rotate: 90deg;' ], true ); } else { $image_a = ''; } - hd($image_a, true); if (empty($img_b) === false) { $image_b = html_print_image( $img_b, true, - [ - 'style' => 'rotate: 90deg;', - 'class' => 'main_menu_icon', - ], + [ 'style' => 'rotate: 180deg;' ], true ); } else { @@ -4260,11 +4253,11 @@ function ui_toggle( $style = 'overflow:hidden;width: -webkit-fill-available;width: -moz-fill-available;'; $style = 'overflow:hidden;'; if ($hidden_default === true) { - $imageRotate = '90deg'; + $imageRotate = '180deg'; $style .= 'height:0;position:absolute;'; $original = $img_b; } else { - $imageRotate = '180deg'; + $imageRotate = '90deg'; $style .= 'height:auto;position:relative;'; $original = $img_a; } @@ -4390,8 +4383,7 @@ function ui_toggle( $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 .= " $('#image_".$uniqid."').addClass('main_menu_icon');\n"; - $output .= " $('#image_".$uniqid."').css('rotate','180deg');\n"; + $output .= " $('#image_".$uniqid."').css('rotate','90deg');\n"; $output .= " $('#checkbox-".$switch_name."').prop('checked', true);\n"; $output .= " }\n"; $output .= " else {\n"; @@ -4399,8 +4391,7 @@ function ui_toggle( $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 .= " $('#image_".$uniqid."').addClass('main_menu_icon');\n"; - $output .= " $('#image_".$uniqid."').css('rotate','90deg');\n"; + $output .= " $('#image_".$uniqid."').css('rotate','180deg');\n"; $output .= " $('#checkbox-".$switch_name."').prop('checked', false);\n"; $output .= " }\n"; $output .= " });\n"; From e539fa96977a2865ba95915120d791022f6f811a Mon Sep 17 00:00:00 2001 From: Jose Gonzalez Date: Wed, 15 Feb 2023 12:48:41 +0100 Subject: [PATCH 2/5] Minor HTML input checkbox fix --- pandora_console/include/functions_html.php | 28 ++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index e2cedfe8bb..3bbd0e086f 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -4144,10 +4144,34 @@ function html_print_checkbox_extended( $idcounter[$name] = 0; } + $inputClass = 'custom_checkbox_input'; + $labelClass = 'custom_checkbox'; + + if (is_array($attributes) === true) { + $tmpAttributes = []; + foreach ($attributes as $key => $value) { + switch ($key) { + case 'input_class': + $inputClass .= ' '.$value; + break; + + case 'label_class': + $labelClass .= ' '.$value; + break; + + default: + $tmpAttributes[] = $key.'="'.$value.'"'; + break; + } + } + + $attributes = implode(' ', $tmpAttributes); + } + $id_aux = preg_replace('/[^a-z0-9\:\;\-\_]/i', '', $name.($idcounter[$name] ? $idcounter[$name] : '')); - $output = '