From 49d82698b1dfe4039ffeb6b542e7ee317dfd7d3e Mon Sep 17 00:00:00 2001 From: Pablo Aragon Date: Tue, 18 Apr 2023 10:21:17 +0200 Subject: [PATCH] 9555-Events style & fix scroll pagination --- pandora_console/images/star-dark.svg | 25 ++++++ .../style/jquery.mobile-1.5.0-rc1.min.css | 74 ------------------ pandora_console/mobile/include/style/main.css | 76 ++++++++++++++++--- pandora_console/mobile/include/user.class.php | 1 + pandora_console/mobile/operation/events.php | 25 +++--- 5 files changed, 105 insertions(+), 96 deletions(-) create mode 100644 pandora_console/images/star-dark.svg diff --git a/pandora_console/images/star-dark.svg b/pandora_console/images/star-dark.svg new file mode 100644 index 0000000000..3345d2790a --- /dev/null +++ b/pandora_console/images/star-dark.svg @@ -0,0 +1,25 @@ + + + + 8FDB48E7-691D-43C7-B7AD-DC381E7FA74C@svg + Created with sketchtool. + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pandora_console/mobile/include/style/jquery.mobile-1.5.0-rc1.min.css b/pandora_console/mobile/include/style/jquery.mobile-1.5.0-rc1.min.css index e543176676..2775545860 100644 --- a/pandora_console/mobile/include/style/jquery.mobile-1.5.0-rc1.min.css +++ b/pandora_console/mobile/include/style/jquery.mobile-1.5.0-rc1.min.css @@ -918,27 +918,8 @@ html .ui-body-a .ui-accordion-content { html .ui-bar-a a, html .ui-body-a a, html body .ui-group-theme-a a { - color: #38c; font-weight: 700; } -.ui-page-theme-a a:visited, -html .ui-bar-a a:visited, -html .ui-body-a a:visited, -html body .ui-group-theme-a a:visited { - color: #38c; -} -.ui-page-theme-a a:hover, -html .ui-bar-a a:hover, -html .ui-body-a a:hover, -html body .ui-group-theme-a a:hover { - color: #059; -} -.ui-page-theme-a a:active, -html .ui-bar-a a:active, -html .ui-body-a a:active, -html body .ui-group-theme-a a:active { - color: #059; -} .ui-page-theme-a .ui-button, html .ui-bar-a .ui-button, html .ui-body-a .ui-button, @@ -1015,25 +996,7 @@ html body div.ui-slider-track.ui-body-a .ui-button-active, .ui-page-theme-a .ui-accordion-header.ui-state-active, html .ui-body-a .ui-accordion-header-active, html .ui-body-a .ui-accordion-header.ui-state-active { - background-color: #38c; - border-color: #38c; color: #fff; - text-shadow: 0 1px 0 #059; -} -.ui-page-theme-a .ui-button:focus, -html .ui-bar-a .ui-button:focus, -html .ui-body-a .ui-button:focus, -html body .ui-group-theme-a .ui-button:focus, -html head + body .ui-button.ui-button-a:focus, -.ui-page-theme-a .ui-focus, -html .ui-bar-a .ui-focus, -html .ui-body-a .ui-focus, -html body .ui-group-theme-a .ui-focus, -html head + body .ui-button-a.ui-focus, -html head + body .ui-body-a.ui-focus { - -webkit-box-shadow: 0 0 12px #38c; - -moz-box-shadow: 0 0 12px #38c; - box-shadow: 0 0 12px #38c; } .ui-bar-b, .ui-page-theme-b .ui-bar-inherit, @@ -1078,27 +1041,8 @@ html .ui-body-b .ui-accordion-content { html .ui-bar-b a, html .ui-body-b a, html body .ui-group-theme-b a { - color: #2ad; font-weight: 700; } -.ui-page-theme-b a:visited, -html .ui-bar-b a:visited, -html .ui-body-b a:visited, -html body .ui-group-theme-b a:visited { - color: #2ad; -} -.ui-page-theme-b a:hover, -html .ui-bar-b a:hover, -html .ui-body-b a:hover, -html body .ui-group-theme-b a:hover { - color: #08b; -} -.ui-page-theme-b a:active, -html .ui-bar-b a:active, -html .ui-body-b a:active, -html body .ui-group-theme-b a:active { - color: #08b; -} .ui-page-theme-b .ui-button, html .ui-bar-b .ui-button, html .ui-body-b .ui-button, @@ -1175,25 +1119,7 @@ html body div.ui-slider-track.ui-body-b .ui-button-active, .ui-page-theme-b .ui-accordion-header.ui-state-active, html .ui-body-b .ui-accordion-header-active, html .ui-body-b .ui-accordion-header.ui-state-active { - background-color: #2ad; - border-color: #2ad; color: #fff; - text-shadow: 0 1px 0 #08b; -} -.ui-page-theme-b .ui-button:focus, -html .ui-bar-b .ui-button:focus, -html .ui-body-b .ui-button:focus, -html body .ui-group-theme-b .ui-button:focus, -html head + body .ui-button.ui-button-b:focus, -.ui-page-theme-b .ui-focus, -html .ui-bar-b .ui-focus, -html .ui-body-b .ui-focus, -html body .ui-group-theme-b .ui-focus, -html head + body .ui-button-b.ui-focus, -html head + body .ui-body-b.ui-focus { - -webkit-box-shadow: 0 0 12px #2ad; - -moz-box-shadow: 0 0 12px #2ad; - box-shadow: 0 0 12px #2ad; } .ui-disabled, .ui-state-disabled, diff --git a/pandora_console/mobile/include/style/main.css b/pandora_console/mobile/include/style/main.css index aec356b6ba..1bba3990b9 100755 --- a/pandora_console/mobile/include/style/main.css +++ b/pandora_console/mobile/include/style/main.css @@ -30,6 +30,7 @@ --secondary-color: #ffffff; --body-color: #f6f7fb; --border-color: #e5e9ed; + --muted-color: #8a96a6; } @font-face { @@ -80,7 +81,7 @@ body { } .ui-header .ui-title { - font-size: 14px !important; + font-size: 12pt !important; min-height: 1.1em; text-align: center; display: block; @@ -90,7 +91,7 @@ body { overflow: hidden; white-space: nowrap; outline: 0 !important; - line-height: 25px; + line-height: 18pt; } .ui-btn-inner { @@ -362,7 +363,7 @@ tr.group_view_data, .datos_green a, .datos_greenf9 a { background-color: #52a000; - color: #ffffff !important; + color: #000000 !important; text-shadow: none !important; } .datos_red, @@ -370,7 +371,7 @@ tr.group_view_data, .datos_red a, .datos_redf9 a { background-color: #ff3e41; - color: #ffffff !important; + color: #000000 !important; text-shadow: none !important; } @@ -416,7 +417,7 @@ tr.group_view_data, } tr.events { - border-bottom: 6px solid #f7f7f7 !important; + border-bottom: 6px solid var(--secondary-color) !important; font-size: 12px !important; } @@ -1868,7 +1869,7 @@ table.tactical_bars > tbody > tr, } div#main_page { - background-color: var(--body-color) !important; + background-color: var(--body-color); } .ui-header.ui-bar-inherit.ui-header-fixed.slidedown { @@ -1905,10 +1906,18 @@ div#main_page { align-items: center; } +span#user_logged { + padding-right: 0px; + right: 20px; + line-height: 30px; + font-size: 10pt !important; +} + .ui-grid-a.ui-responsive { background-color: var(--secondary-color); border-radius: 8px; border: 1px solid var(--border-color); + margin-bottom: 10px; } .ui-button-icon-space { @@ -1947,6 +1956,12 @@ div.hr { margin: 10px 0px; } +div.hr-full { + border-bottom: 1px solid var(--border-color); + width: 200%; + margin: 10px -100px; +} + table, fieldset { padding: 0px 5px !important; @@ -2032,6 +2047,8 @@ div#tactical2 .tactical_set > table { .ui-collapsible.ui-collapsible-inset.ui-corner-all.ui-collapsible-themed-content.ui-collapsible-collapsed { border: 1px solid var(--border-color); border-radius: 8px; + margin-top: 0px; + margin-bottom: 10px; } .ui-collapsible-heading-toggle.ui-button.ui-button-a.ui-mini, @@ -2065,13 +2082,15 @@ table#last-activity > tbody > tr > td.cell_0 { padding-bottom: 2px !important; } table#last-activity > tbody > tr > td.cell_1 { - width: 75%; + width: 70%; max-width: 75%; padding-bottom: 2px !important; } table#last-activity > tbody > tr > td.cell_2 { - width: 15%; + width: 20%; padding-bottom: 2px !important; + padding-left: 0px !important; + padding-right: 0px !important; } table#last-activity > tbody > tr > td.cell_3 { width: 10%; @@ -2084,5 +2103,44 @@ table#last-activity > tbody > tr > td > b { } .muted { - color: #8a96a6 !important; + color: var(--muted-color) !important; +} + +.white-card { + background-color: var(--secondary-color); + padding: 10px; + border: 1px solid var(--border-color); + border-radius: 8px; +} + +/* Events table */ +table#list_events > tbody > tr.events > td.cell_0 { + border-top-left-radius: 8px !important; + border-top-right-radius: 8px !important; +} + +table#list_events > tbody > tr.events > td.vertical_middle { + border-bottom-left-radius: 8px !important; + border-bottom-right-radius: 8px !important; + color: #4a4a4a; +} + +table#list_events > tbody > tr.events { + background-color: var(--secondary-color) !important; +} + +table#list_events > tbody > tr.events.datos_green > td { + background-color: #81b92e40; +} +table#list_events > tbody > tr.events.datos_red > td { + background-color: #ed474a40; +} +table#list_events > tbody > tr.events.datos_yellow > td { + background-color: #fcab1040; +} +table#list_events > tbody > tr.events.datos_blue > td { + background-color: #25a8ff40; +} +table#list_events > tbody > tr.events.datos_grey > td { + background-color: #adadad40; } diff --git a/pandora_console/mobile/include/user.class.php b/pandora_console/mobile/include/user.class.php index 00a7e605d1..200a3faba8 100644 --- a/pandora_console/mobile/include/user.class.php +++ b/pandora_console/mobile/include/user.class.php @@ -560,6 +560,7 @@ class User $(".ui-overlay-a").addClass("login-background"); $(".ui-overlay-a").removeClass("ui-overlay-a"); $(".ui-page-theme-a").css({"background-color":"transparent !important"}); + $("div.ui-page.ui-page-theme-a.ui-page-active#main_page").css({"background-color":"transparent !important"}); }); ' diff --git a/pandora_console/mobile/operation/events.php b/pandora_console/mobile/operation/events.php index 16212053d2..1021bd862c 100644 --- a/pandora_console/mobile/operation/events.php +++ b/pandora_console/mobile/operation/events.php @@ -195,15 +195,15 @@ class Events switch ($event['estado']) { case 0: - $img_st = 'images/star_white.png'; + $img_st = 'images/star-dark.svg'; break; case 1: - $img_st = 'images/tick_white.png'; + $img_st = 'images/validate.svg'; break; case 2: - $img_st = 'images/hourglass_white.png'; + $img_st = 'images/clock.svg'; break; default: @@ -221,7 +221,7 @@ class Events $status_icon = html_print_image( $img_st, true, - false, + ['class' => 'main_menu_icon'], false, false, false, @@ -264,11 +264,7 @@ class Events $row_1 = ''.$agent_name.''; $row_1 .= ''; - $row_1 .= ui_print_timestamp( - $event['timestamp_last'], - true, - ['units' => 'tiny'] - ); + $row_1 .= human_time_comparation($event['timestamp_last'], 'tiny'); $row_1 .= $status_icon; $row_1 .= ''; @@ -1008,7 +1004,10 @@ class Events $html = $ui->getEndForm(); $ui->contentCollapsibleAddItem($html); $ui->contentEndCollapsible(); + $ui->contentAddHtml('
'); + $ui->contentAddHtml('
'); $this->listEventsHtml(); + $ui->contentAddHtml('
'); $ui->endContent(); $ui->showPage(); } @@ -1351,14 +1350,14 @@ class Events $(\"table#\"+table_id+\" tbody\").append(new_rows); - load_more_rows = 0; + // load_more_rows = 0; refresh_link_listener_list_events(); } } function ajax_load_rows() { - if (load_more_rows) { - load_more_rows = 0; + if (load_more_rows) { + // load_more_rows = 0; postvars = {}; postvars[\"action\"] = \"ajax\"; postvars[\"parameter1\"] = \"events\"; @@ -1383,7 +1382,7 @@ class Events //Check if the end of the event list tables is in the client limits var table_end = $('#list_events').offset().top + $('#list_events').height(); if (table_end < document.documentElement.clientHeight) { - ajax_load_rows(); + // ajax_load_rows(); } }