diff options
author | Mario Vavti <mario@mariovavti.com> | 2018-01-26 11:44:24 +0100 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2018-01-26 11:44:24 +0100 |
commit | 7c600b03803bfddd2d98084ef5c1976e35b84f9e (patch) | |
tree | 4e596309501e9fc0ca3d45d55dd1ff8635c0a2cd /view/js/main.js | |
parent | e982698de1791101fe912e9d0ab715799f30fe3f (diff) | |
download | volse-hubzilla-7c600b03803bfddd2d98084ef5c1976e35b84f9e.tar.gz volse-hubzilla-7c600b03803bfddd2d98084ef5c1976e35b84f9e.tar.bz2 volse-hubzilla-7c600b03803bfddd2d98084ef5c1976e35b84f9e.zip |
preserve open state of notifications
Diffstat (limited to 'view/js/main.js')
-rw-r--r-- | view/js/main.js | 10 |
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') { |