Added onclick to notification-item's

Former-commit-id: 2e4833686b08b104b11ba9023f6eca38e0ed6bd9
This commit is contained in:
fermin831 2019-02-12 16:46:21 +01:00
parent cc2b2709f9
commit 48724fe033
3 changed files with 10 additions and 2 deletions

View File

@ -423,7 +423,7 @@ config_check();
} }
function click_on_notification_toast(event) { function click_on_notification_toast(event) {
var match = /notification-toast-id-([0-9]+)/.exec(event.target.id); var match = /notification-.*-id-([0-9]+)/.exec(event.target.id);
if (!match) { if (!match) {
console.error( console.error(
"Cannot handle toast click event. Id not valid: ", "Cannot handle toast click event. Id not valid: ",

View File

@ -967,7 +967,11 @@ function notifications_print_dropdown()
function notifications_print_dropdown_element($message_info) function notifications_print_dropdown_element($message_info)
{ {
return sprintf( return sprintf(
"<div class='notification-item'> "<div
class='notification-item'
onclick='click_on_notification_toast(event)'
id='notification-item-id-%s'
>
<img src='%s'> <img src='%s'>
<div class='notification-info'> <div class='notification-info'>
<h4 class='notification-title'> <h4 class='notification-title'>
@ -978,6 +982,7 @@ function notifications_print_dropdown_element($message_info)
</p> </p>
</div> </div>
</div>", </div>",
$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['description'],
$message_info['mensaje'] $message_info['mensaje']

View File

@ -4305,6 +4305,8 @@ div#dialog_messages table th:last-child {
position: absolute; position: absolute;
width: 400px; width: 400px;
margin-top: -5px; margin-top: -5px;
max-height: 78%;
overflow: auto;
} }
#notification-wrapper::before { #notification-wrapper::before {
content: ""; content: "";
@ -4341,6 +4343,7 @@ div#dialog_messages table th:last-child {
} }
.notification-item > * { .notification-item > * {
padding-left: 15px; padding-left: 15px;
pointer-events: none;
} }
.notification-info { .notification-info {