From f9b342c87d4129c457244861b3b841cb9dfe139b Mon Sep 17 00:00:00 2001 From: git-marijus Date: Fri, 28 Jul 2017 22:42:02 +0200 Subject: initial notifications support for new shared files and new (since initial site load) pubstream activity --- view/js/main.js | 18 +++++++++++++++++- view/tpl/nav.tpl | 16 ++++++++++++++++ view/tpl/settings.tpl | 4 ++++ view/tpl/sharedwithme.tpl | 2 +- 4 files changed, 38 insertions(+), 2 deletions(-) (limited to 'view') diff --git a/view/js/main.js b/view/js/main.js index 6c42531ea..8c49e3173 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -370,7 +370,7 @@ function NavUpdate() { updateCountsOnly = false; - if(data.network || data.home || data.intros || data.mail || data.all_events || data.notify) { + if(data.network || data.home || data.intros || data.mail || data.all_events || data.notify || data.files || data.pubs) { $('#notifications-btn').css('opacity', 1); } else { @@ -386,6 +386,22 @@ function NavUpdate() { } $('.net-update').html(data.network); + if(data.pubs == 0) { + data.pubs = ''; + $('.pubs-update, .pubs-button').hide(); + } else { + $('.pubs-update, .pubs-button').show(); + } + $('.pubs-update').html(data.pubs); + + if(data.files == 0) { + data.files = ''; + $('.files-update, .files-button').hide(); + } else { + $('.files-update, .files-button').show(); + } + $('.files-update').html(data.files); + if(data.home == 0) { data.home = ''; $('.home-update, .home-button').hide(); } else { $('.home-update, .home-button').show(); } $('.home-update').html(data.home); diff --git a/view/tpl/nav.tpl b/view/tpl/nav.tpl index b9abf4d48..3e0ae8d5c 100755 --- a/view/tpl/nav.tpl +++ b/view/tpl/nav.tpl @@ -166,6 +166,22 @@ {{$nav.alogout.1}} {{/if}} + {{if $nav.files}} + + {{/if}} + {{if $nav.pubs}} + + {{/if}} diff --git a/view/tpl/settings.tpl b/view/tpl/settings.tpl index 6673e5815..3a8e31107 100755 --- a/view/tpl/settings.tpl +++ b/view/tpl/settings.tpl @@ -137,6 +137,10 @@ {{include file="field_intcheckbox.tpl" field=$vnotify8}} {{include file="field_intcheckbox.tpl" field=$vnotify9}} {{include file="field_intcheckbox.tpl" field=$vnotify11}} + {{include file="field_intcheckbox.tpl" field=$vnotify12}} + {{if $vnotify13}} + {{include file="field_intcheckbox.tpl" field=$vnotify13}} + {{/if}} {{include file="field_intcheckbox.tpl" field=$always_show_in_notices}} {{include file="field_input.tpl" field=$evdays}} diff --git a/view/tpl/sharedwithme.tpl b/view/tpl/sharedwithme.tpl index 68bdd6faa..8474ccd52 100644 --- a/view/tpl/sharedwithme.tpl +++ b/view/tpl/sharedwithme.tpl @@ -15,7 +15,7 @@ {{foreach $items as $item}} - {{$item.objfilename}}{{if $item.unseen}} {{$label_new}}{{/if}} + {{$item.objfilename}}{{if $item.unseen}} {{$label_new}}{{/if}} {{$item.objfilesize}} {{$item.objedited}} -- cgit v1.2.3