diff options
author | zotlabs <mike@macgirvin.com> | 2018-01-26 12:51:04 -0800 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2018-01-26 12:51:04 -0800 |
commit | d70c42b4954fceed64fdc3c7b4f0f5095752b53f (patch) | |
tree | 9a7cf6c4e4fbd63582a72eafc137b8aa62b26eec /view/js/main.js | |
parent | 660079bd2a4a6dcb54390a4c2f22bbc7a0633fd4 (diff) | |
parent | 7c600b03803bfddd2d98084ef5c1976e35b84f9e (diff) | |
download | volse-hubzilla-d70c42b4954fceed64fdc3c7b4f0f5095752b53f.tar.gz volse-hubzilla-d70c42b4954fceed64fdc3c7b4f0f5095752b53f.tar.bz2 volse-hubzilla-d70c42b4954fceed64fdc3c7b4f0f5095752b53f.zip |
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into xdev_merge
Diffstat (limited to 'view/js/main.js')
-rw-r--r-- | view/js/main.js | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/view/js/main.js b/view/js/main.js index 89202c94f..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') { @@ -389,10 +399,9 @@ function notificationsUpdate(cached_data) { } var notifyType = null; - - if($('.notification-content.show').length) + if($('.notification-content.show').length) { notifyType = $('.notification-content.show').data('type'); - + } if(notifyType !== null) { loadNotificationItems(notifyType); } @@ -437,7 +446,6 @@ function handleNotifications(data) { } function handleNotificationsItems(notifyType, data) { - var notifications_tpl= unescape($("#nav-notifications-template[rel=template]").html()); var notify_menu = $("#nav-" + notifyType + "-menu"); @@ -931,11 +939,9 @@ function justifyPhotosAjax(id) { } function loadNotificationItems(notifyType) { - var pingExCmd = 'ping/' + notifyType + ((localUser != 0) ? '?f=&uid=' + localUser : ''); var clicked = $('[data-type=\'' + notifyType + '\']').data('clicked'); - if((clicked === undefined) && (sessionStorage.getItem(notifyType + '_notifications_cache') !== null)) { var cached_data = JSON.parse(sessionStorage.getItem(notifyType + '_notifications_cache')); handleNotificationsItems(notifyType, cached_data); |