aboutsummaryrefslogtreecommitdiffstats
path: root/view/theme
diff options
context:
space:
mode:
authorSimon L'nu <simon.lnu@gmail.com>2012-03-16 16:43:34 -0400
committerSimon L'nu <simon.lnu@gmail.com>2012-03-16 16:43:34 -0400
commit91fee866b7f870b66d770c7c4e6db0afd874de33 (patch)
tree535368ad80b1cf341d8cd529d1f77e72c2bbda4d /view/theme
parent01f87108324eb6b45f3649400557ada4e54502f7 (diff)
downloadvolse-hubzilla-91fee866b7f870b66d770c7c4e6db0afd874de33.tar.gz
volse-hubzilla-91fee866b7f870b66d770c7c4e6db0afd874de33.tar.bz2
volse-hubzilla-91fee866b7f870b66d770c7c4e6db0afd874de33.zip
make profiles-menu disappear when clicked outside it
Signed-off-by: Simon L'nu <simon.lnu@gmail.com>
Diffstat (limited to 'view/theme')
-rw-r--r--view/theme/dispy-dark/theme.php9
-rw-r--r--view/theme/dispy/theme.php9
2 files changed, 18 insertions, 0 deletions
diff --git a/view/theme/dispy-dark/theme.php b/view/theme/dispy-dark/theme.php
index 0134b1f91..b57971db9 100644
--- a/view/theme/dispy-dark/theme.php
+++ b/view/theme/dispy-dark/theme.php
@@ -73,6 +73,15 @@ $(document).ready(function() {
$('#nav-notifications-linkmenu').click(function(event) {
event.stopPropagation();
});
+ // click outside profiles menu closes it
+ $('html').click(function() {
+ $('#profiles-menu-trigger').removeClass('selected');
+ document.getElementById("profiles-menu").style.display = "none";
+ });
+
+ $('#profiles-menu').click(function(event) {
+ event.stopPropagation();
+ });
// main function in toolbar functioning
function toggleToolbar() {
diff --git a/view/theme/dispy/theme.php b/view/theme/dispy/theme.php
index ac97948a3..9f0fcba82 100644
--- a/view/theme/dispy/theme.php
+++ b/view/theme/dispy/theme.php
@@ -73,6 +73,15 @@ $(document).ready(function() {
$('#nav-notifications-linkmenu').click(function(event) {
event.stopPropagation();
});
+ // click outside profiles menu closes it
+ $('html').click(function() {
+ $('#profiles-menu-trigger').removeClass('selected');
+ document.getElementById("profiles-menu").style.display = "none";
+ });
+
+ $('#profiles-menu').click(function(event) {
+ event.stopPropagation();
+ });
// main function in toolbar functioning
function toggleToolbar() {