aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgit-marijus <mario@mariovavti.com>2017-07-29 16:06:42 +0200
committergit-marijus <mario@mariovavti.com>2017-07-29 16:06:42 +0200
commit7b992decd4fdd670e6c01ea31a14e756974bf1a2 (patch)
treee937916a40066fd7179fee1c4be167c06944baa0
parent1f57a59618bc5e6bb8d0cda3031ba2751947e0c9 (diff)
downloadvolse-hubzilla-7b992decd4fdd670e6c01ea31a14e756974bf1a2.tar.gz
volse-hubzilla-7b992decd4fdd670e6c01ea31a14e756974bf1a2.tar.bz2
volse-hubzilla-7b992decd4fdd670e6c01ea31a14e756974bf1a2.zip
close the apps-menu if the notifications-menu is open and vice versa
-rw-r--r--view/js/main.js2
-rw-r--r--view/theme/redbasic/js/redbasic.js12
-rwxr-xr-xview/tpl/nav.tpl2
3 files changed, 14 insertions, 2 deletions
diff --git a/view/js/main.js b/view/js/main.js
index 8c49e3173..54450858a 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -375,7 +375,7 @@ function NavUpdate() {
}
else {
$('#notifications-btn').css('opacity', 0.5);
- $('#navbar-collapse-1').removeClass('in');
+ $('#navbar-collapse-1').removeClass('show');
}
if(data.network == 0) {
diff --git a/view/theme/redbasic/js/redbasic.js b/view/theme/redbasic/js/redbasic.js
index a4fee495c..5a586b9f9 100644
--- a/view/theme/redbasic/js/redbasic.js
+++ b/view/theme/redbasic/js/redbasic.js
@@ -54,6 +54,18 @@ $(document).ready(function() {
}
});
+ $('#menu-btn').click(function() {
+ if($('#navbar-collapse-1').hasClass('show')){
+ $('#navbar-collapse-1').removeClass('show');
+ }
+ });
+
+ $('#notifications-btn').click(function() {
+ if($('#navbar-collapse-2').hasClass('show')){
+ $('#navbar-collapse-2').removeClass('show');
+ }
+ });
+
$("input[data-role=cat-tagsinput]").tagsinput({
tagClass: 'badge badge-pill badge-warning text-dark'
});
diff --git a/view/tpl/nav.tpl b/view/tpl/nav.tpl
index 137fed790..ae354e371 100755
--- a/view/tpl/nav.tpl
+++ b/view/tpl/nav.tpl
@@ -68,7 +68,7 @@
<i class="fa fa-exclamation-circle"></i>
</button>
{{/if}}
- <button class="navbar-toggler border-0" type="button" data-toggle="collapse" data-target="#navbar-collapse-2">
+ <button id="menu-btn" class="navbar-toggler border-0" type="button" data-toggle="collapse" data-target="#navbar-collapse-2">
<i class="fa fa-bars"></i>
</button>
</div>