From c2d00123e599224a1357c77b485a34ca880b184f Mon Sep 17 00:00:00 2001 From: Pablo Aragon Date: Mon, 25 Mar 2024 13:29:49 +0100 Subject: [PATCH] 13146-Change header notifications styles --- pandora_console/general/header.php | 17 +--- .../include/functions_notifications.php | 92 ++++++++++--------- pandora_console/include/styles/pandora.css | 69 ++++++++++---- .../include/styles/pandora_black.css | 6 ++ 4 files changed, 106 insertions(+), 78 deletions(-) diff --git a/pandora_console/general/header.php b/pandora_console/general/header.php index 5502fec94f..396098359c 100644 --- a/pandora_console/general/header.php +++ b/pandora_console/general/header.php @@ -599,21 +599,12 @@ echo sprintf('
', $menuTypeClass); function filter_notification() { let notification_type = ''; $('.notification-item').hide(); - $(".checkbox_filter_notifications:checkbox:checked").each(function() { - notification_type = $(this).val(); - console.log(notification_type); - $('.notification-item[value='+notification_type+']').show(); - if (notification_type == 'All'){ - $('.notification-item').show(); - } - }); + notification_type = $("#notifications_filter_options").val() - if (notification_type == 'All'){ + if (notification_type === 'All') { $('.notification-item').show(); - } - - if (notification_type == ''){ - $('.notification-item').hide(); + } else { + $('.notification-item[value='+notification_type+']').show(); } } diff --git a/pandora_console/include/functions_notifications.php b/pandora_console/include/functions_notifications.php index f16e8fd25b..30b30539d5 100644 --- a/pandora_console/include/functions_notifications.php +++ b/pandora_console/include/functions_notifications.php @@ -1066,39 +1066,39 @@ function notification_filter() } $types_list = array_unique($types_list); - $notification_filter = "'; return $notification_filter; } @@ -1161,19 +1155,23 @@ function notifications_print_dropdown() $mess = []; } - $redirection_notifications = html_print_menu_button( + $redirection_notifications = html_print_button( + __('See all notifications'), + 'see_all_notifications', + false, + 'window.location="'.ui_get_full_url('index.php?sec=message_list&sec2=operation/messages/message_list').'"', [ - 'href' => 'javascript:', - 'class' => 'notification_menu_actions', - 'text' => __('View all messages'), - 'onClick' => "window.location='".ui_get_full_url('index.php?sec=message_list&sec2=operation/messages/message_list')."'", + 'mode' => 'secondary', + 'class' => 'bolder', + 'icon' => 'unset', ], true ); + $notification_menu = html_print_menu_button( [ 'href' => 'javascript:', - 'class' => 'notification_menu_actions', + 'class' => 'notification_menu_actions link-bold font_14px', 'text' => __('Mark all as read'), 'onClick' => 'mark_all_notification_as_read()', ], @@ -1187,9 +1185,13 @@ function notifications_print_dropdown()
-
- %s +
+ %s +
+
+
%s
+
* { padding-left: 7px; pointer-events: none; @@ -10571,7 +10584,7 @@ button.submitButton:active { border: 2px solid #57ea82; } -button.buttonButton > div, +button.buttonButton > div:not(.unset), button.submitButton > div { background-color: #fff; width: 2rem; @@ -12660,11 +12673,12 @@ form.cfv_status_agent input:checked + label:before { .notificaion_menu_container { display: flex; - padding-top: 10px; - padding-left: 15px; -} -.notification_menu { - width: 100px; + padding: 10px 15px; + flex-direction: row; + flex-wrap: nowrap; + align-items: center; + justify-content: space-between; + border-bottom: 1px solid #e5e9ed; } .filter_notification { @@ -13847,3 +13861,18 @@ button.disabled { .tabs-show { display: list-item; } + +.link-bold { + color: var(--primary-color); + text-decoration: none; + font-weight: bold; +} + +.link-bold:hover { + opacity: 0.9; + color: var(--primary-color); +} + +.text-nowrap { + text-wrap: nowrap; +} diff --git a/pandora_console/include/styles/pandora_black.css b/pandora_console/include/styles/pandora_black.css index a3025c3a33..decda97a59 100644 --- a/pandora_console/include/styles/pandora_black.css +++ b/pandora_console/include/styles/pandora_black.css @@ -1885,3 +1885,9 @@ a.pandora_pagination, #score-bar .labels-bar div { color: white; } + +a.link-bold { + color: var(--primary-color) !important; + text-decoration: none; + font-weight: bold; +}