From b033597ada02ef045bc9fbdb2237f81935b73e47 Mon Sep 17 00:00:00 2001 From: Mario Date: Mon, 11 Nov 2019 21:30:38 +0100 Subject: sse notifications --- view/tpl/notifications_widget.tpl | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) (limited to 'view/tpl/notifications_widget.tpl') diff --git a/view/tpl/notifications_widget.tpl b/view/tpl/notifications_widget.tpl index bc7f80906..057d5b491 100644 --- a/view/tpl/notifications_widget.tpl +++ b/view/tpl/notifications_widget.tpl @@ -85,7 +85,7 @@ $('#nav-{{$notification.type}}-menu [data-thread_top=false]').toggle(); $(this).toggleClass('active sticky-top'); }); - $(document).on('click ', '#cn-{{$notification.type}}-input-clear', function(e) { + $(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'); @@ -93,8 +93,8 @@ }); $(document).on('input', '#cn-{{$notification.type}}-input', function(e) { var val = $('#cn-{{$notification.type}}-input').val().toString().toLowerCase(); - if(val) { + val = val.indexOf('%') == 0 ? val.substring(1) : val; $('#cn-{{$notification.type}}-only').addClass('active sticky-top'); $('#cn-{{$notification.type}}-input-clear').removeClass('d-none'); } @@ -135,16 +135,17 @@ {{$no_notifications}}...