Bugzilla – Attachment 160328 Details for
Bug 33494
Catalog concerns - Toggle 'Hide resolved' and 'Show all'
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33494: Make filters a toggle
Bug-33494-Make-filters-a-toggle.patch (text/plain), 2.95 KB, created by
David Nind
on 2023-12-27 19:10:42 UTC
(
hide
)
Description:
Bug 33494: Make filters a toggle
Filename:
MIME Type:
Creator:
David Nind
Created:
2023-12-27 19:10:42 UTC
Size:
2.95 KB
patch
obsolete
>From b9e640397d108fed956eea3e718fdecde20c14a6 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Wed, 27 Dec 2023 16:01:05 +0000 >Subject: [PATCH] Bug 33494: Make filters a toggle > >This patch updates the markup to make the 'Filter resolved | Show all' a >toggle filter rather than two buttons. > >Signed-off-by: David Nind <david@davidnind.com> >--- > .../prog/en/modules/cataloguing/concerns.tt | 27 ++++++++++--------- > 1 file changed, 15 insertions(+), 12 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/concerns.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/concerns.tt >index 2a9336cc29..cdb3ec09da 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/concerns.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/concerns.tt >@@ -39,9 +39,8 @@ > <h1>Concerns</h1> > > <div class="page-section"> >- <fieldset class="action" style="cursor:pointer;"> >- <a id="hideResolved"><i class="fa fa-minus-square"></i> Hide resolved</a> >- | <a id="showAll"><i class="fa fa-bars"></i> Show all</a> >+ <fieldset class="action filters" style="cursor:pointer;"> >+ <a id="resolved_filter" class="filtered"><i class="fa fa-bars"></i> Include resolved</a> > </fieldset> > > <table id="table_concerns"> >@@ -81,10 +80,10 @@ > > var table_settings = [% TablesSettings.GetTableSettings('cataloguing', 'concerns', 'table_concerns', 'json') | $raw %]; > >- var filtered = false; >+ var filter_resolved = true; > let additional_filters = { > resolved_date: function(){ >- if ( filtered ) { >+ if ( filter_resolved ) { > return { "=": null }; > } else { > return; >@@ -184,14 +183,18 @@ > ] > }, table_settings, 1, additional_filters); > >- $('#hideResolved').on("click", function() { >- filtered = true; >- tickets.DataTable().draw(); >- }); >- >- $('#showAll').on("click", function() { >- filtered = false; >+ var txtActivefilter = _("Filter resolved"); >+ var txtInactivefilter = _("Include resolved"); >+ $('#resolved_filter').on("click", function() { >+ if ($(this).hasClass('filtered')){ >+ filter_resolved = false; >+ $(this).html('<i class="fa fa-bars"></i> '+txtActivefilter); >+ } else { >+ filter_resolved = true; >+ $(this).html('<i class="fa fa-filter"></i> '+txtInactivefilter); >+ } > tickets.DataTable().draw(); >+ $(this).toggleClass('filtered'); > }); > }); > </script> >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 33494
:
160324
|
160328
|
162491
|
164911
|
165546