Bugzilla – Attachment 165546 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), 3.64 KB, created by
Marcel de Rooy
on 2024-04-25 14:04:09 UTC
(
hide
)
Description:
Bug 33494: Make filters a toggle
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2024-04-25 14:04:09 UTC
Size:
3.64 KB
patch
obsolete
>From 1ffe9fc90640c87cf1ca3936023b8a76298226ea 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 >Content-Type: text/plain; charset=utf-8 > >This patch updates the markup to make the 'Filter resolved | Show all' a >toggle filter rather than two buttons. > >Test plan >1. Enable the CatalogConcerns system preference. >2. For two records, add a catalog concern (New > New catalog concern). >3. Resolve one of the concerns (Cataloging > Reports > Catalog concerns) > - click on the 'Details' button then the 'Resolve' button. >4. Note that the filters at the top of the page are labelled: Hide > resolved | Show all >5. Apply the patch and refresh the page. >6. Note that it is now a 'toggle': 'Include resolved' (default) or > 'Filter resolved' > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Signed-off-by: David Nind <david@davidnind.com> >Signed-off-by: Ray Delahunty <lib-systems@arts.ac.uk> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > .../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 f16e5f2609..eeae5a31d6 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/concerns.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/concerns.tt >@@ -40,9 +40,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"> >@@ -82,10 +81,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; >@@ -186,14 +185,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