From 87e82c04105e6ff33589f1bd985a7b49c21dc82e Mon Sep 17 00:00:00 2001 From: Pablo Aragon Date: Wed, 8 Mar 2023 15:30:48 +0100 Subject: [PATCH] 10457-Audit log, save/load filters --- pandora_console/include/ajax/audit_log.php | 41 ++++++++++++------- .../include/class/AuditLog.class.php | 4 +- pandora_console/include/styles/pandora.css | 37 +++++++++++++++++ pandora_console/include/styles/tables.css | 4 -- 4 files changed, 66 insertions(+), 20 deletions(-) diff --git a/pandora_console/include/ajax/audit_log.php b/pandora_console/include/ajax/audit_log.php index 3bf5e09d24..4d92704852 100644 --- a/pandora_console/include/ajax/audit_log.php +++ b/pandora_console/include/ajax/audit_log.php @@ -135,18 +135,15 @@ if ($load_filter_modal) { $table->width = '100%'; $table->cellspacing = 4; $table->cellpadding = 4; - $table->class = 'databox'; + $table->class = 'databox no_border'; if (is_metaconsole()) { $table->cellspacing = 0; $table->cellpadding = 0; - $table->class = 'databox filters'; + $table->class = 'databox filters no_border'; } $table->styleTable = 'font-weight: bold; color: #555; text-align:left;'; - $filter_id_width = '200px'; - if (is_metaconsole()) { - $filter_id_width = '150px'; - } + $filter_id_width = 'w100p'; $data = []; $table->rowid[3] = 'update_filter_row1'; @@ -165,11 +162,17 @@ if ($load_filter_modal) { false, 'margin-left:5px; width:'.$filter_id_width.';' ); + + $table->rowclass[] = 'display-grid'; $data[1] = html_print_submit_button( __('Load filter'), 'load_filter', false, - 'class="sub upd" onclick="load_filter_values()"', + [ + 'class' => 'mini w25p', + 'style' => 'margin-left: 73%', + 'onclick' => 'load_filter_values();', + ], true ); $data[1] .= html_print_input_hidden('load_filter', 1, true); @@ -186,7 +189,7 @@ function show_filter() { draggable: true, modal: false, closeOnEscape: true, - width: 450 + width: 500 }); } @@ -238,7 +241,7 @@ $(document).ready (function() { if ($save_filter_modal) { - echo '
'; + echo '
'; if (check_acl($config['id_user'], 0, 'EW') === 1 || check_acl($config['id_user'], 0, 'EM') === 1) { echo '
'; @@ -247,9 +250,9 @@ if ($save_filter_modal) { $table->width = '100%'; $table->cellspacing = 4; $table->cellpadding = 4; - $table->class = 'databox'; + $table->class = 'databox no_border'; if (is_metaconsole()) { - $table->class = 'databox filters'; + $table->class = 'databox filters no_border'; $table->cellspacing = 0; $table->cellpadding = 0; } @@ -289,7 +292,11 @@ if ($save_filter_modal) { __('Save filter'), 'save_filter', false, - 'class="sub wand" onclick="save_new_filter();"', + [ + 'class' => 'mini w25p', + 'style' => 'margin-left: 56%', + 'onclick' => 'save_new_filter();', + ], true ); @@ -317,11 +324,16 @@ if ($save_filter_modal) { 0, true ); + $table->rowclass[] = 'display-grid'; $data[1] = html_print_submit_button( __('Update filter'), 'update_filter', false, - 'class="sub upd" onclick="save_update_filter();"', + [ + 'class' => 'mini w25p', + 'style' => 'margin-left: 56%', + 'onclick' => 'save_update_filter();', + ], true ); @@ -359,7 +371,8 @@ function show_save_filter() { resizable: true, draggable: true, modal: false, - closeOnEscape: true + closeOnEscape: true, + width: 380 }); } diff --git a/pandora_console/include/class/AuditLog.class.php b/pandora_console/include/class/AuditLog.class.php index 31120b7014..93f391ee73 100644 --- a/pandora_console/include/class/AuditLog.class.php +++ b/pandora_console/include/class/AuditLog.class.php @@ -437,7 +437,7 @@ class AuditLog extends HTML $('#audit_logs').css('width','95% !important'); }); - $('#save-filter').click(function() { + $('#button-save-filter').click(function() { if ($('#save-filter-select').length) { $('#save-filter-select').dialog({ width: "20%", @@ -495,7 +495,7 @@ class AuditLog extends HTML }); /* Filter management */ - $('#load-filter').click(function (){ + $('#button-load-filter').click(function (){ if($('#load-filter-select').length) { $('#load-filter-select').dialog({width: "20%", maxWidth: "25%", diff --git a/pandora_console/include/styles/pandora.css b/pandora_console/include/styles/pandora.css index 4837f18d08..ee4a24d5f5 100644 --- a/pandora_console/include/styles/pandora.css +++ b/pandora_console/include/styles/pandora.css @@ -86,6 +86,43 @@ font-weight: 900; } +/* +@font-face { + font-family: "lato-italic"; + src: url("../fonts/Lato-Italic.woff") format("woff"); + font-weight: 400; + font-style: italic; +} + +@font-face { + font-family: "lato"; + src: url("../fonts/Lato-LightItalic.woff") format("woff"); + font-weight: 300; + font-style: italic; +} + +@font-face { + font-family: "lato"; + src: url("../fonts/Lato-ThinItalic.woff") format("woff"); + font-weight: 100; + font-style: italic; +} + +@font-face { + font-family: "lato"; + src: url("../fonts/Lato-BoldItalic.woff") format("woff"); + font-weight: 700; + font-style: italic; +} + +@font-face { + font-family: "lato"; + src: url("../fonts/Lato-BlackItalic.woff") format("woff"); + font-weight: 900; + font-style: italic; +} +*/ + @font-face { font-family: "source-code"; src: url("../fonts/SourceCodePro.woff") format("woff"); diff --git a/pandora_console/include/styles/tables.css b/pandora_console/include/styles/tables.css index 4383e02ea5..4ff2775884 100644 --- a/pandora_console/include/styles/tables.css +++ b/pandora_console/include/styles/tables.css @@ -648,10 +648,6 @@ td#save_filter_form-1-0 > b { line-height: 16px; } -tr#save_filter_row1 { - display: flex !important; -} - td#save_filter_form-0-0, td#save_filter_form-0-1, td#save_filter_form-1-0 > input#text-id_name,