aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2017-02-03 11:00:35 +0100
committerMario Vavti <mario@mariovavti.com>2017-02-03 11:00:35 +0100
commita5c1685ea0323de974d4a1469f122283e278e91a (patch)
tree71337fbc436adccdd4d490d6863c1f1c9fcfbb3b
parent8e4960f31d3a64b1518cc7839c6697ac7c53243d (diff)
downloadvolse-hubzilla-a5c1685ea0323de974d4a1469f122283e278e91a.tar.gz
volse-hubzilla-a5c1685ea0323de974d4a1469f122283e278e91a.tar.bz2
volse-hubzilla-a5c1685ea0323de974d4a1469f122283e278e91a.zip
hide notifications button if there are none
-rw-r--r--view/js/main.js8
-rwxr-xr-xview/tpl/nav.tpl2
2 files changed, 9 insertions, 1 deletions
diff --git a/view/js/main.js b/view/js/main.js
index ed2f6a2e1..11dd1b817 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -368,6 +368,14 @@ function NavUpdate() {
updateCountsOnly = false;
+ if(data.network || data.home || data.intros || data.mail || data.all_events || data.notify) {
+ $('#notifications-btn').show();
+ }
+ else {
+ $('#notifications-btn').hide();
+ $('#navbar-collapse-1').removeClass('in');
+ }
+
if(data.network == 0) {
data.network = '';
$('.net-update, .net-button').hide();
diff --git a/view/tpl/nav.tpl b/view/tpl/nav.tpl
index 65edae92a..8b7a27d0c 100755
--- a/view/tpl/nav.tpl
+++ b/view/tpl/nav.tpl
@@ -6,7 +6,7 @@
<span class="icon-bar"></span>
</button>
{{if $localuser}}
- <button id="notifications-btn" type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-collapse-1">
+ <button id="notifications-btn" type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-collapse-1" style="display: none">
<i class="fa fa-exclamation-circle"></i>
</button>
{{/if}}