minor fixes/updates in notifications UI

Former-commit-id: d4f5b7db1b5a6f0a023e33c4b8cd55db7765b11a
This commit is contained in:
fbsanchez 2019-02-13 16:40:37 +01:00
parent 9951aadab3
commit f75a292b34
3 changed files with 8 additions and 7 deletions

View File

@ -170,6 +170,7 @@ config_check();
if (!isset($_GET['refr'])) { if (!isset($_GET['refr'])) {
$_GET['refr'] = null; $_GET['refr'] = null;
} }
$select = db_process_sql("SELECT autorefresh_white_list,time_autorefresh FROM tusuario WHERE id_user = '".$config['id_user']."'"); $select = db_process_sql("SELECT autorefresh_white_list,time_autorefresh FROM tusuario WHERE id_user = '".$config['id_user']."'");
$autorefresh_list = json_decode($select[0]['autorefresh_white_list']); $autorefresh_list = json_decode($select[0]['autorefresh_white_list']);
@ -416,8 +417,6 @@ config_check();
toast_div.appendChild(toast_text); toast_div.appendChild(toast_text);
toast.appendChild(toast_div); toast.appendChild(toast_div);
console.log(toast);
// Show and program the hide event. // Show and program the hide event.
toast_div.className = toast_div.className + ' show'; toast_div.className = toast_div.className + ' show';
setTimeout(function(){ setTimeout(function(){
@ -478,7 +477,7 @@ config_check();
data.new_notifications.forEach(function(ele) { data.new_notifications.forEach(function(ele) {
toast_wrapper.appendChild( toast_wrapper.appendChild(
print_toast( print_toast(
ele.description, ele.subject,
ele.mensaje, ele.mensaje,
ele.criticity, ele.criticity,
ele.full_url, ele.full_url,

View File

@ -978,7 +978,7 @@ function notifications_print_dropdown_element($message_info)
href='%s' href='%s'
target='_blank' target='_blank'
> >
<img src='%s'> %s
<div class='notification-info'> <div class='notification-info'>
<h4 class='notification-title'> <h4 class='notification-title'>
%s %s
@ -991,7 +991,7 @@ function notifications_print_dropdown_element($message_info)
$message_info['id_mensaje'], $message_info['id_mensaje'],
messages_get_url($message_info['id_mensaje']), messages_get_url($message_info['id_mensaje']),
html_print_image('images/'.$message_info['icon'], true), html_print_image('images/'.$message_info['icon'], true),
$message_info['description'], $message_info['subject'],
$message_info['mensaje'] str_replace([io_safe_input('<br>')], ' ', $message_info['mensaje'])
); );
} }

View File

@ -4292,7 +4292,7 @@ div#dialog_messages table th:last-child {
.notification-ball-no-messages { .notification-ball-no-messages {
background-color: #82b92e; background-color: #82b92e;
cursor: inherit; cursor: pointer;
} }
.notification-ball-new-messages { .notification-ball-new-messages {
background-color: #fc4444; background-color: #fc4444;
@ -4342,6 +4342,7 @@ div#dialog_messages table th:last-child {
display: flex; display: flex;
flex-flow: row nowrap; flex-flow: row nowrap;
align-items: center; align-items: center;
padding: 5px;
} }
.notification-item > * { .notification-item > * {
padding-left: 15px; padding-left: 15px;
@ -4754,6 +4755,7 @@ input:checked + .p-slider:before {
border-radius: 4px; border-radius: 4px;
visibility: hidden; visibility: hidden;
pointer-events: all; pointer-events: all;
transition: visibility 0s 1s;
} }
.snackbar.show { .snackbar.show {