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) {
var match = /notification-toast-id-([0-9]+)/.exec(event.target.id);
var match = /notification-.*-id-([0-9]+)/.exec(event.target.id);
if (!match) {
console.error(
"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)
{
return sprintf(
"<div class='notification-item'>
"<div
class='notification-item'
onclick='click_on_notification_toast(event)'
id='notification-item-id-%s'
>
<img src='%s'>
<div class='notification-info'>
<h4 class='notification-title'>
@ -978,6 +982,7 @@ function notifications_print_dropdown_element($message_info)
</p>
</div>
</div>",
$message_info['id_mensaje'],
html_print_image('images/'.$message_info['icon'], true),
$message_info['description'],
$message_info['mensaje']

View File

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