aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-04-29 22:39:29 -0700
committerfriendica <info@friendica.com>2012-04-29 22:39:29 -0700
commit384d28a6bd04648a2d15e257568a5c9f65273db4 (patch)
tree0e4c1e0420d07ae865cc518d43d83447d5e21311
parentda555286d6571cc7951af6e91bd3f4021027603e (diff)
parentab908469ae89cbc7ba3b45b25fd85668e51abaea (diff)
downloadvolse-hubzilla-384d28a6bd04648a2d15e257568a5c9f65273db4.tar.gz
volse-hubzilla-384d28a6bd04648a2d15e257568a5c9f65273db4.tar.bz2
volse-hubzilla-384d28a6bd04648a2d15e257568a5c9f65273db4.zip
Merge pull request #276 from tomtom84/master
close one menu (like notificationsmenu) when another one is opened (like when clicking somewhere else)
-rw-r--r--js/main.js16
1 files changed, 10 insertions, 6 deletions
diff --git a/js/main.js b/js/main.js
index ac238bf6a..6a2632441 100644
--- a/js/main.js
+++ b/js/main.js
@@ -73,7 +73,16 @@
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){
+ close_last_popup_menu();
menu = $( $(this).attr('rel') );
e.preventDefault();
e.stopPropagation();
@@ -90,12 +99,7 @@
return false;
});
$('html').click(function() {
- if(last_popup_menu) {
- last_popup_menu.hide();
- last_popup_button.removeClass("selected");
- last_popup_menu = null;
- last_popup_button = null;
- }
+ close_last_popup_menu();
});
// fancyboxes