From c6acb6191ca558fce121e7df26a8aba88beac2d9 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Fri, 30 Nov 2018 19:03:14 -0800 Subject: allow notification filtering by name or addr --- view/js/main.js | 2 +- view/tpl/notifications_widget.tpl | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) (limited to 'view') diff --git a/view/js/main.js b/view/js/main.js index 085bc8d0d..f4bfd413b 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -544,7 +544,7 @@ function handleNotificationsItems(notifyType, data) { notify_menu.html(''); $(data).each(function() { - html = notifications_tpl.format(this.notify_link,this.photo,this.name,this.message,this.when,this.hclass,this.b64mid,this.notify_id,this.thread_top,this.unseen,this.private_forum); + html = notifications_tpl.format(this.notify_link,this.photo,this.name,this.addr,this.message,this.when,this.hclass,this.b64mid,this.notify_id,this.thread_top,this.unseen,this.private_forum); notify_menu.append(html); }); diff --git a/view/tpl/notifications_widget.tpl b/view/tpl/notifications_widget.tpl index f43d82301..48521c81c 100644 --- a/view/tpl/notifications_widget.tpl +++ b/view/tpl/notifications_widget.tpl @@ -105,8 +105,9 @@ $("#nav-{{$notification.type}}-menu .notification").each(function(i, el){ var cn = $(el).data('contact_name').toString().toLowerCase(); + var ca = $(el).data('contact_addr').toString().toLowerCase(); - if(cn.indexOf(val) === -1) + if(cn.indexOf(val) === -1 && ca.indexOf(val) === -1) $(this).addClass('d-none'); else $(this).removeClass('d-none'); @@ -134,18 +135,18 @@ {{$no_notifications}}...