diff options
author | friendica <info@friendica.com> | 2013-01-06 22:00:31 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2013-01-06 22:00:31 -0800 |
commit | 479541b5f804b3d7f4b955ff00715cbc7232d86c (patch) | |
tree | e259afaaf394cb55ffa47b240565e0585df73ecc /js/main.js | |
parent | 0cda9601c6805aab7daa9b6380f9150bccd46fc0 (diff) | |
download | volse-hubzilla-479541b5f804b3d7f4b955ff00715cbc7232d86c.tar.gz volse-hubzilla-479541b5f804b3d7f4b955ff00715cbc7232d86c.tar.bz2 volse-hubzilla-479541b5f804b3d7f4b955ff00715cbc7232d86c.zip |
more work on notification popup
Diffstat (limited to 'js/main.js')
-rw-r--r-- | js/main.js | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/js/main.js b/js/main.js index 67105bd16..356efcf79 100644 --- a/js/main.js +++ b/js/main.js @@ -155,22 +155,26 @@ setupFieldRichtext(); /* popup menus */ - function close_last_popup_menu() { - - if(last_popup_menu) { - last_popup_menu.hide(); - last_popup_button.removeClass("selected"); - last_popup_menu = null; - last_popup_button = null; - } - } - $('a[rel^=#]').click(function(e){ + function close_last_popup_menu() { + if(last_popup_menu) { + last_popup_menu.hide(); + last_popup_button.removeClass("selected"); + last_popup_menu = null; + last_popup_button = null; + } + } + + $('a[rel^=#]').click(function(e){ close_last_popup_menu(); menu = $( $(this).attr('rel') ); e.preventDefault(); e.stopPropagation(); if (menu.attr('popup')=="false") return false; $(this).parent().toggleClass("selected"); + var loader_source = $(menu).attr('rel'); + if(loader_source.length) { + notify_popup_loader(loader_source); + } menu.toggle(); if (menu.css("display") == "none") { last_popup_menu = null; @@ -181,6 +185,7 @@ } return false; }); + $('html').click(function() { close_last_popup_menu(); }); @@ -509,13 +514,7 @@ function updateConvItems(mode,data) { $(node).removeClass("drop").addClass("drophide"); } - function notify_popup(notifyType) { - - if($("#nav-notifications-menu").is(":visible")) { - $("#nav-notifications-menu").hide(); - return; - } - + function notify_popup_loader(notifyType) { /* notifications template */ var notifications_tpl= unescape($("#nav-notifications-template[rel=template]").html()); @@ -549,7 +548,6 @@ function updateConvItems(mode,data) { } }); - $("#nav-notifications-menu").show(); } |