From ecd161d678e17c32e74a886ff976da736a512a97 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Fri, 19 Jan 2018 11:40:16 +0100 Subject: provide a button to clear the name filter --- view/tpl/notifications_widget.tpl | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/view/tpl/notifications_widget.tpl b/view/tpl/notifications_widget.tpl index 9489e850c..c926586eb 100644 --- a/view/tpl/notifications_widget.tpl +++ b/view/tpl/notifications_widget.tpl @@ -65,6 +65,11 @@ $('#nav-{{$notification.type}}-menu [data-thread_top=false]').toggle(); $(this).toggleClass('active sticky-top'); }); + $(document).on('click ', '#cn-{{$notification.type}}-input-clear', function(e) { + $('#cn-{{$notification.type}}-input').val(''); + $('#cn-{{$notification.type}}-only').removeClass('active sticky-top'); + $("#nav-{{$notification.type}}-menu .notification").removeClass('d-none'); + }); $(document).on('keyup', '#cn-{{$notification.type}}-input', function(e) { var val = $('#cn-{{$notification.type}}-input').val().toLowerCase(); @@ -134,8 +139,13 @@
{{$notification.filter.label}}
-
- +
+
+ +
+ +
+
{{/if}}