diff options
author | Mario Vavti <mario@mariovavti.com> | 2018-01-19 11:40:16 +0100 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2018-01-19 11:40:16 +0100 |
commit | ecd161d678e17c32e74a886ff976da736a512a97 (patch) | |
tree | e9e0945849b59559bd833b740374f38618e26b22 /view | |
parent | e9f32ef94e5cb188e86a8cf43f9580b462d0ea46 (diff) | |
download | volse-hubzilla-ecd161d678e17c32e74a886ff976da736a512a97.tar.gz volse-hubzilla-ecd161d678e17c32e74a886ff976da736a512a97.tar.bz2 volse-hubzilla-ecd161d678e17c32e74a886ff976da736a512a97.zip |
provide a button to clear the name filter
Diffstat (limited to 'view')
-rw-r--r-- | view/tpl/notifications_widget.tpl | 14 |
1 files 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 @@ <div class="list-group-item cursor-pointer" id="tt-{{$notification.type}}-only"> <i class="fa fa-fw fa-filter"></i> {{$notification.filter.label}} </div> - <div class="list-group-item notifications-textinput" id="cn-{{$notification.type}}-only"> - <input id="cn-{{$notification.type}}-input" type="text" class="form-control form-control-sm" placeholder=" Filter by name"> + <div class="list-group-item clearfix notifications-textinput" id="cn-{{$notification.type}}-only"> + <div class="input-group"> + <input id="cn-{{$notification.type}}-input" type="text" class="form-control form-control-sm" placeholder=" Filter by name"> + <div id="cn-{{$notification.type}}-input-clear" class="input-group-append"> + <span class="input-group-text"><i class="fa fa-remove"></i></span> + </div> + </div> </div> {{/if}} <div id="nav-{{$notification.type}}-menu" class="" rel="{{$notification.type}}"> |