#12973 Added vc_text_margin
This commit is contained in:
parent
921505f360
commit
a5ddef0b77
|
@ -1439,7 +1439,7 @@ $table_vc->data[$row][] = html_print_label_input_block(
|
|||
|
||||
$table_vc->data[$row][] = html_print_label_input_block(
|
||||
__('Number of favorite visual consoles to show in the menu'),
|
||||
"<input ' value=".$config['vc_menu_items']." size='5' name='vc_menu_items' min='0' max='25'>"
|
||||
'<input value="'.$config['vc_menu_items'].'" size="5" name="vc_menu_items" min="0" max="25">'
|
||||
);
|
||||
$row++;
|
||||
|
||||
|
@ -1455,6 +1455,12 @@ $table_vc->data[$row][] = html_print_label_input_block(
|
|||
)
|
||||
);
|
||||
|
||||
$table_vc->data[$row][] = html_print_label_input_block(
|
||||
__('Visual console default text margin (em)'),
|
||||
'<input value="'.$config['vc_text_margin'].'" name="vc_text_margin" min="0" max="100" step="0.1">'
|
||||
);
|
||||
$row++;
|
||||
|
||||
$table_vc->data[$row][] = html_print_label_input_block(
|
||||
__('Lock screen orientation when viewing on mobile devices'),
|
||||
html_print_checkbox_switch(
|
||||
|
@ -1464,7 +1470,6 @@ $table_vc->data[$row][] = html_print_label_input_block(
|
|||
true
|
||||
)
|
||||
);
|
||||
$row++;
|
||||
|
||||
$table_vc->data[$row][] = html_print_label_input_block(
|
||||
__('Display item frame on alert triggered').ui_print_help_tip(__('It displays an orange box around items that have triggered an alert.'), true),
|
||||
|
|
|
@ -1263,6 +1263,10 @@ function config_update_config()
|
|||
$error_update[] = __('Default line menu items for the Visual Console');
|
||||
}
|
||||
|
||||
if (config_update_value('vc_text_margin', (int) get_parameter('vc_text_margin', 1), true) === false) {
|
||||
$error_update[] = __('Default text margin for the Visual Console');
|
||||
}
|
||||
|
||||
if (config_update_value('vc_line_thickness', (int) get_parameter('vc_line_thickness'), true) === false) {
|
||||
$error_update[] = __('Default line thickness for the Visual Console');
|
||||
}
|
||||
|
@ -2913,6 +2917,10 @@ function config_process_config()
|
|||
config_update_value('vc_menu_items', 10);
|
||||
}
|
||||
|
||||
if (!isset($config['vc_text_margin'])) {
|
||||
config_update_value('vc_text_margin', 1);
|
||||
}
|
||||
|
||||
if (!isset($config['ser_menu_items'])) {
|
||||
config_update_value('ser_menu_items', 10);
|
||||
}
|
||||
|
|
|
@ -627,6 +627,14 @@ if ($pure === true) {
|
|||
<?php
|
||||
}
|
||||
|
||||
?>
|
||||
<style type="text/css">
|
||||
.visual-console-item-label p,pre,h4,h5,h6 {
|
||||
margin-block-start: <?php echo $config['vc_text_margin'].'em'; ?>;
|
||||
margin-block-end: <?php echo $config['vc_text_margin'].'em'; ?>;
|
||||
}
|
||||
</style>
|
||||
<?php
|
||||
// Check groups can access user.
|
||||
$aclUserGroups = [];
|
||||
if (users_can_manage_group_all('AR') === false) {
|
||||
|
|
Loading…
Reference in New Issue