aboutsummaryrefslogtreecommitdiffstats
path: root/view/tpl/notifications_widget.tpl
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2020-05-03 12:31:10 +0000
committerMario <mario@mariovavti.com>2020-05-03 12:31:10 +0000
commitfd48f9d173a7a76f9ecaedf078272f5fd3bdd706 (patch)
treea71c06a78aae6988dbdcac3bc99133c92f083416 /view/tpl/notifications_widget.tpl
parent104c45f6e6550f723f976bd071bb0bd8e9aafce9 (diff)
downloadvolse-hubzilla-fd48f9d173a7a76f9ecaedf078272f5fd3bdd706.tar.gz
volse-hubzilla-fd48f9d173a7a76f9ecaedf078272f5fd3bdd706.tar.bz2
volse-hubzilla-fd48f9d173a7a76f9ecaedf078272f5fd3bdd706.zip
improve functionality of combined notification filters
Diffstat (limited to 'view/tpl/notifications_widget.tpl')
-rw-r--r--view/tpl/notifications_widget.tpl18
1 files changed, 12 insertions, 6 deletions
diff --git a/view/tpl/notifications_widget.tpl b/view/tpl/notifications_widget.tpl
index 146c510f1..001a202af 100644
--- a/view/tpl/notifications_widget.tpl
+++ b/view/tpl/notifications_widget.tpl
@@ -81,14 +81,20 @@
{{foreach $notifications as $notification}}
{{if $notification.filter}}
$(document).on('click', '#tt-{{$notification.type}}-only', function(e) {
- e.preventDefault();
- $('#nav-{{$notification.type}}-menu [data-thread_top=false]').toggleClass('d-none');
- $(this).toggleClass('active sticky-top');
+ if($(this).hasClass('active sticky-top')) {
+ $('#nav-{{$notification.type}}-menu .notification[data-thread_top=false]').removeClass('tt-filter-active');
+ $(this).removeClass('active sticky-top');
+ }
+ else {
+ $('#nav-{{$notification.type}}-menu .notification[data-thread_top=false]').addClass('tt-filter-active');
+ $(this).addClass('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');
+ $("#nav-{{$notification.type}}-menu .notification").removeClass('cn-filter-active');
$('#cn-{{$notification.type}}-input-clear').addClass('d-none');
});
$(document).on('input', '#cn-{{$notification.type}}-input', function(e) {
@@ -108,9 +114,9 @@
var ca = $(el).data('contact_addr').toString().toLowerCase();
if(cn.indexOf(val) === -1 && ca.indexOf(val) === -1)
- $(this).addClass('d-none');
+ $(this).addClass('cn-filter-active');
else
- $(this).removeClass('d-none');
+ $(this).removeClass('cn-filter-active');
});
});
{{/if}}