aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2018-01-26 11:44:24 +0100
committerMario Vavti <mario@mariovavti.com>2018-01-26 11:44:24 +0100
commit7c600b03803bfddd2d98084ef5c1976e35b84f9e (patch)
tree4e596309501e9fc0ca3d45d55dd1ff8635c0a2cd
parente982698de1791101fe912e9d0ab715799f30fe3f (diff)
downloadvolse-hubzilla-7c600b03803bfddd2d98084ef5c1976e35b84f9e.tar.gz
volse-hubzilla-7c600b03803bfddd2d98084ef5c1976e35b84f9e.tar.bz2
volse-hubzilla-7c600b03803bfddd2d98084ef5c1976e35b84f9e.zip
preserve open state of notifications
-rw-r--r--view/js/main.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/view/js/main.js b/view/js/main.js
index 8eb02156b..13d002968 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -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') {