preserve open state of notifications

This commit is contained in:
Mario Vavti 2018-01-26 11:44:24 +01:00
parent e982698de1
commit 7c600b0380

View File

@ -70,11 +70,21 @@ $(document).ready(function() {
if(! $('#nav-' + notifyType + '-sub').hasClass('show')) {
loadNotificationItems(notifyType);
sessionStorage.setItem('notification_open', notifyType);
}
else {
sessionStorage.removeItem('notification_open');
}
$(this).data('clicked', true);
});
if(sessionStorage.getItem('notification_open') !== null) {
var notifyType = sessionStorage.getItem('notification_open');
$('#nav-' + notifyType + '-sub').addClass('show');
loadNotificationItems(notifyType);
}
// Allow folks to stop the ajax page updates with the pause/break key
$(document).keydown(function(event) {
if(event.keyCode == '8') {