1
1
Fork 0
- [frio] Add a wrapping `a` tag around the notification text
- Add an event listener preventing popup menus to close when they are
themselves clicked
This commit is contained in:
Hypolite Petovan 2016-09-29 23:46:43 -04:00
parent 835edf74b3
commit f4c2e2244d
2 changed files with 7 additions and 5 deletions

View file

@ -130,6 +130,7 @@
function close_last_popup_menu() { function close_last_popup_menu() {
if(last_popup_menu) { if(last_popup_menu) {
last_popup_menu.hide(); last_popup_menu.hide();
last_popup_menu.off('click', function(e) {e.stopPropagation()});
last_popup_button.removeClass("selected"); last_popup_button.removeClass("selected");
last_popup_menu = null; last_popup_menu = null;
last_popup_button = null; last_popup_button = null;
@ -152,6 +153,7 @@
last_popup_button = null; last_popup_button = null;
} else { } else {
last_popup_menu = menu; last_popup_menu = menu;
last_popup_menu.on('click', function(e) {e.stopPropagation()});
last_popup_button = parent; last_popup_button = parent;
$('#nav-notifications-menu').perfectScrollbar('update'); $('#nav-notifications-menu').perfectScrollbar('update');
} }

View file

@ -276,13 +276,13 @@
{{*The second part of the notifications dropdown menu. It handles the notifications *}} {{*The second part of the notifications dropdown menu. It handles the notifications *}}
{{if $nav.notifications}} {{if $nav.notifications}}
<ul id="nav-notifications-template" class="media-list" style="display:none;" rel="template"> <!-- needs further investigation. I thought the notifications have their own templates --> <ul id="nav-notifications-template" class="media-list" style="display:none;" rel="template"> <!-- needs further investigation. I thought the notifications have their own templates -->
<li class="{4} notif-entry" onclick="location.href='{0}';"> <li class="{4} notif-entry">
<div class="notif-entry-wrapper media"> <div class="notif-entry-wrapper media">
<div class="notif-photo-wrapper media-object pull-left"><a href="{6}"><img data-src="{1}"></a></div> <div class="notif-photo-wrapper media-object pull-left"><a href="{6}"><img data-src="{1}"></a></div>
<div class="notif-desc-wrapper media-body"> <a href="{0}" class="notif-desc-wrapper media-body">
{8}{7} {2}
<div><time class="notif-when time" data-toggle="tooltip" title="{5}">{3}</time></div> <div><time class="notif-when time" data-toggle="tooltip" title="{5}">{3}</time></div>
</div> </a>
</div> </div>
</li> </li>
</ul> </ul>