From a5c1685ea0323de974d4a1469f122283e278e91a Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Fri, 3 Feb 2017 11:00:35 +0100 Subject: [PATCH] hide notifications button if there are none --- view/js/main.js | 8 ++++++++ view/tpl/nav.tpl | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) 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 @@ {{if $localuser}} - {{/if}}