diff options
author | friendica <info@friendica.com> | 2012-04-12 05:47:57 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2012-04-12 05:47:57 -0700 |
commit | 23b08e3ea79936ecee0a061e38a08145f3fca1da (patch) | |
tree | 6f2fa30889c7935bb3f70da10ff5d33f4700fa09 /js/main.js | |
parent | 815a727076210e6fd7edd6815c33e4bc56e674c6 (diff) | |
parent | 309f2bfa5f85e80e94d6ee177496c5a095201943 (diff) | |
download | volse-hubzilla-23b08e3ea79936ecee0a061e38a08145f3fca1da.tar.gz volse-hubzilla-23b08e3ea79936ecee0a061e38a08145f3fca1da.tar.bz2 volse-hubzilla-23b08e3ea79936ecee0a061e38a08145f3fca1da.zip |
Merge pull request #228 from fabrixxm/master
settings tabs, notifications js and quattro
Diffstat (limited to 'js/main.js')
-rwxr-xr-x | js/main.js | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/js/main.js b/js/main.js index 7f0428b5b..7a90fa910 100755 --- a/js/main.js +++ b/js/main.js @@ -137,13 +137,12 @@ $('#mail-update-li').html(mail); var eNotif = $(data).find('notif') - notif = eNotif.attr('count'); - if (notif>=0){ - $("#nav-notifications-linkmenu").addClass("on"); + + if (eNotif.children("note").length==0){ + $("#nav-notifications-menu").html(notifications_empty); + } else { nnm = $("#nav-notifications-menu"); - nnm.html(notifications_all + notifications_mark); - //nnm.attr('popup','true'); eNotif.children("note").each(function(){ e = $(this); @@ -151,10 +150,12 @@ html = notifications_tpl.format(e.attr('href'),e.attr('photo'), text, e.attr('date'), e.attr('seen')); nnm.append(html); }); - + } + notif = eNotif.attr('count'); + if (notif>0){ + $("#nav-notifications-linkmenu").addClass("on"); } else { - // $("#nav-notifications-linkmenu").removeClass("on"); - // $("#nav-notifications-menu").html(notifications_empty); + $("#nav-notifications-linkmenu").removeClass("on"); } if(notif == 0) { notif = ''; $('#notify-update').removeClass('show') } else { $('#notify-update').addClass('show') } $('#notify-update').html(notif); @@ -609,4 +610,4 @@ function previewTheme(elm) { $('#theme-preview').html('<div id="theme-desc">' + data.desc + '</div><a href="' + data.img + '"><img src="' + data.img + '" width="320" height="240" alt="' + theme + '" /></a>'); }); -}
\ No newline at end of file +} |