Minor visual fixes

This commit is contained in:
Jose Gonzalez 2023-02-14 16:41:24 +01:00
parent be33b2f51a
commit 36308b1be0
7 changed files with 49 additions and 21 deletions

View File

@ -59,7 +59,7 @@ if ($enterprise_include === true) {
$id = get_parameter('id', get_parameter('id_user', ''));
// Check if we are the same user for edit or we have a proper profile for edit users.
if ($id !== $config['id_user']) {
if ((bool) check_acl($config['id_user'], 0, 'UM') === false) {
if ((is_centralized() === true) || (bool) check_acl($config['id_user'], 0, 'UM') === false) {
db_pandora_audit(
AUDIT_LOG_ACL_VIOLATION,
'Trying to access User Management'

View File

@ -337,8 +337,11 @@ if ($delete_user === true) {
);
if (isset($private_dashboards) === true) {
db_process_sql_delete('tdashboard', ['id_user' => $id_user]);
header('Refresh:1');
$dashboardRemoveResult = db_process_sql_delete('tdashboard', ['id_user' => $id_user]);
// Refresh the view when delete private dashboards. For review.
if ($dashboardRemoveResult === false || (int) $dashboardRemoveResult > 0) {
header('Refresh:1');
}
}
$result = delete_user($id_user);
@ -720,7 +723,13 @@ foreach ($info as $user_id => $user_info) {
|| isset($group_um[0]) || (isset($user_info['edit'])
&& $user_info['edit']))))
) {
$data[0] = '<a href="#" onclick="document.forms[\'edit_user_form_'.$user_info['id_user'].'\'].submit();">'.$user_id.'</a>';
$data[0] = html_print_anchor(
[
'href' => ui_get_full_url('index.php?sec=gusuarios&sec2=godmode/users/configure_user&edit_user=1&pure=0&id_user='.$user_id),
'content' => $user_id,
],
true
);
} else {
$data[0] = $user_id;
}

View File

@ -338,7 +338,7 @@ class Wizard
public function printBreadcrum()
{
return implode(
'<span class="breadcrumb_link">&nbsp/&nbsp</span>',
'<span class="breadcrumb_link_separator">&nbsp/&nbsp</span>',
$this->breadcrum
);
}

View File

@ -311,7 +311,7 @@ class HTML
public function printBreadcrum()
{
return implode(
'<span class="breadcrumb_link">&nbsp/&nbsp</span>',
'<span class="breadcrumb_link_separator">&nbsp/&nbsp</span>',
$this->breadcrum
);
}

View File

@ -4213,8 +4213,8 @@ function ui_toggle(
$toggle_class='',
$container_class='white-box-content',
$main_class='box-flat white_table_graph',
$img_a='images/arrow_down_green.png',
$img_b='images/arrow_right_green.png',
$img_a='images/arrow@svg.svg',
$img_b='images/arrow@svg.svg',
$clean=false,
$reverseImg=false,
$switch=false,
@ -4231,18 +4231,25 @@ function ui_toggle(
$image_a = html_print_image(
$img_a,
true,
[ 'style' => 'object-fit: contain;' ],
[
'style' => 'rotate: 45deg;',
'class' => 'main_menu_icon',
],
true
);
} else {
$image_a = '';
}
hd($image_a, true);
if (empty($img_b) === false) {
$image_b = html_print_image(
$img_b,
true,
[ 'style' => 'object-fit: contain;' ],
[
'style' => 'rotate: 90deg;',
'class' => 'main_menu_icon',
],
true
);
} else {
@ -4252,10 +4259,12 @@ function ui_toggle(
// Options.
$style = 'overflow:hidden;width: -webkit-fill-available;width: -moz-fill-available;';
$style = 'overflow:hidden;';
if ($hidden_default) {
if ($hidden_default === true) {
$imageRotate = '90deg';
$style .= 'height:0;position:absolute;';
$original = $img_b;
} else {
$imageRotate = '180deg';
$style .= 'height:auto;position:relative;';
$original = $img_a;
}
@ -4303,15 +4312,15 @@ function ui_toggle(
$original,
true,
[
'class' => 'float-left',
'style' => 'object-fit: contain; margin-right:10px;',
'class' => 'float-left main_menu_icon',
'style' => 'object-fit: contain; margin-right:10px; rotate:'.$imageRotate,
'title' => $title,
'id' => 'image_'.$uniqid,
]
);
}
$output .= '<b>'.$name.'</b>';
$output .= $name;
} else {
$output .= $name;
if ($switch === true) {
@ -4335,7 +4344,8 @@ function ui_toggle(
$original,
true,
[
'style' => 'object-fit: contain; float:right; margin-right:10px;',
'class' => 'main_menu_icon',
'style' => 'object-fit: contain; float:right; margin-right:10px; rotate:'.$imageRotate,
'title' => $title,
'id' => 'image_'.$uniqid,
]
@ -4359,6 +4369,7 @@ function ui_toggle(
$output .= ' var is_metaconsole = '.(int) is_metaconsole().";\n";
$output .= ' /* <![CDATA[ */'."\n";
$output .= " $(document).ready (function () {\n";
$output .= " $('#image_".$uniqid."').addClass('main_menu_icon');\n";
$output .= " $('#checkbox-".$switch_name."').click(function() {\n";
$output .= ' if (is_metaconsole == 0) {';
$output .= ' if (hide_tgl_ctrl_'.$uniqid.") {\n";
@ -4379,6 +4390,8 @@ 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 .= " $('#checkbox-".$switch_name."').prop('checked', true);\n";
$output .= " }\n";
$output .= " else {\n";
@ -4386,6 +4399,8 @@ 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 .= " $('#checkbox-".$switch_name."').prop('checked', false);\n";
$output .= " }\n";
$output .= " });\n";

View File

@ -140,7 +140,7 @@ div.arrow_box:before {
*/
.breadcrumb_link {
color: #848484;
font-size: 10pt;
font-size: 12px;
text-decoration: none;
}
@ -155,9 +155,11 @@ span.breadcrumb_link {
.breadcrumb_link.selected:hover {
color: #14524f;
text-decoration: none;
}
.breadcrumb_link:hover {
color: #14524f;
text-decoration: none;
}
/*

View File

@ -1941,10 +1941,9 @@ div#agent_wizard_subtabs {
#menu_tab_left li a,
#menu_tab_left li span {
color: #343434;
/*font-size: 13pt;*/
font-size: 16pt;
/*line-height: 18pt;*/
color: #161628;
font-size: 15px;
font-family: Pandora-Bold;
}
/* New styles for data box */
@ -11006,10 +11005,13 @@ table.table_modal_alternate
}
.subsection_header_title {
font-size: 13pt;
font-size: 18px;
font-weight: initial;
}
span.subsection_header_title {
height: 18px;
}
.regular_font {
font-family: "Pandora-Regular" !important;
}