Bugzilla – Attachment 112399 Details for
Bug 26769
Remove the use of jquery.checkboxes plugin from staff interface search history
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Attachment to Bug 26769 - Remove the use of jquery.checkboxes plugin from staff interface search history
Bug-26769-Remove-the-use-of-jquerycheckboxes-plugi.patch (text/plain), 8.41 KB, created by
Lisette Scheer
on 2020-10-24 20:27:54 UTC
(
hide
)
Description:
Attachment to Bug 26769 - Remove the use of jquery.checkboxes plugin from staff interface search history
Filename:
MIME Type:
Creator:
Lisette Scheer
Created:
2020-10-24 20:27:54 UTC
Size:
8.41 KB
patch
obsolete
>From ab6393f0bcaabe91448f3a2aba6cc0c7e3e8cba3 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Thu, 22 Oct 2020 10:33:41 +0000 >Subject: [PATCH] Bug 26769: Remove the use of jquery.checkboxes plugin from > staff interface search history > >This patch modifies the staff interface search history page to eliminate >theuse of the jquery.checkboxes plugin. > >To test you should have some search history items for bibliographic and >authority records, both from today and from days previous. > >Apply the patch and click the logged-in-user link in the staff client >header. Choose "Search history." > >On the search history page, test the "Select all" and "Clear selection" >links corresponding to all four tables: > >- Catalog: Current session >- Catalog: Previous sessions >- Authority: Current session >- Authority: Previous sessions > >In all cases the links should work correctly, affecting only the >corresponding tables. Confirm that the "Select all" action enables the >corresponding "Delete" link for each table. > >Signed-off-by: Lisette Scheer <lisettes@latahlibrary.org> >--- > .../prog/en/modules/catalogue/search-history.tt | 61 ++++++++++++---------- > 1 file changed, 34 insertions(+), 27 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/search-history.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/search-history.tt >index bc109f3fc0..bb50498ae4 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/search-history.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/search-history.tt >@@ -30,17 +30,17 @@ > <div id="biblio_tab"> > [% IF ( current_biblio_searches ) %] > <h2>Current session</h2> >- <form action="/cgi-bin/koha/catalogue/search-history.pl" method="post"> >- <div class="selections-toolbar"> >- <a class="CheckAll" href="#"><i class="fa fa-check"></i> Select all visible rows</a> >+ <form id="current_cat" action="/cgi-bin/koha/catalogue/search-history.pl" method="post"> >+ <p class="selections-toolbar"> >+ <a class="CheckAll" data-form="current_cat" href="#"><i class="fa fa-check"></i> Select all visible rows</a> > <span class="sep">|</span> >- <a class="CheckNone" href="#"><i class="fa fa-remove"></i> Clear selection on visible rows</a> >+ <a class="CheckNone" data-form="current_cat" href="#"><i class="fa fa-remove"></i> Clear selection on visible rows</a> > <span class="sep">|</span> > <span class="links"> > <span class="selections">Select searches to: </span> > <a href="#" class="action_delete disabled">Delete</a> > </span> >- </div> >+ </p> > <input type="hidden" name="action" value="delete" /> > <table class="historyt"> > <thead> >@@ -65,19 +65,23 @@ > </form> > [% END %] > >+ [% IF ( current_biblio_searches && previous_biblio_searches) %] >+ <hr /> >+ [% END %] >+ > [% IF ( previous_biblio_searches ) %] > <h2>Previous sessions</h2> >- <form action="/cgi-bin/koha/catalogue/search-history.pl" method="post"> >- <div class="selections-toolbar"> >- <a class="CheckAll" href="#"><i class="fa fa-check"></i> Select all visible rows</a> >+ <form id="previous_cat" action="/cgi-bin/koha/catalogue/search-history.pl" method="post"> >+ <p class="selections-toolbar"> >+ <a class="CheckAll" data-form="previous_cat" href="#"><i class="fa fa-check"></i> Select all visible rows</a> > <span class="sep">|</span> >- <a class="CheckNone" href="#"><i class="fa fa-remove"></i> Clear selection on visible rows</a> >+ <a class="CheckNone" data-form="previous_cat" href="#"><i class="fa fa-remove"></i> Clear selection on visible rows</a> > <span class="sep">|</span> > <span class="links"> > <span class="selections">Select searches to: </span> > <a href="#" class="action_delete disabled">Delete</a> > </span> >- </div> >+ </p> > <input type="hidden" name="action" value="delete" /> > <table class="historyt"> > <thead> >@@ -110,17 +114,17 @@ > <div id="authority_tab"> > [% IF ( current_authority_searches ) %] > <h2>Current session</h2> >- <form action="/cgi-bin/koha/catalogue/search-history.pl" method="post"> >- <div class="selections-toolbar"> >- <a class="CheckAll" href="#"><i class="fa fa-check"></i> Select all visible rows</a> >+ <form id="current_auth" action="/cgi-bin/koha/catalogue/search-history.pl" method="post"> >+ <p class="selections-toolbar"> >+ <a class="CheckAll" data-form="current_auth" href="#"><i class="fa fa-check"></i> Select all visible rows</a> > <span class="sep">|</span> >- <a class="CheckNone" href="#"><i class="fa fa-remove"></i> Clear selection on visible rows</a> >+ <a class="CheckNone" data-form="current_auth" href="#"><i class="fa fa-remove"></i> Clear selection on visible rows</a> > <span class="sep">|</span> > <span class="links"> > <span class="selections">Select searches to: </span> > <a href="#" class="action_delete disabled">Delete</a> > </span> >- </div> >+ </p> > <input type="hidden" name="action" value="delete" /> > <table class="historyt"> > <thead> >@@ -145,19 +149,23 @@ > </form> > [% END %] > >+ [% IF ( current_authority_searches && previous_authority_searches) %] >+ <hr /> >+ [% END %] >+ > [% IF ( previous_authority_searches ) %] > <h2>Previous sessions</h2> >- <form action="/cgi-bin/koha/catalogue/search-history.pl" method="post"> >- <div class="selections-toolbar"> >- <a class="CheckAll" href="#"><i class="fa fa-check"></i> Select all visible rows</a> >+ <form id="previous_auth" action="/cgi-bin/koha/catalogue/search-history.pl" method="post"> >+ <p class="selections-toolbar"> >+ <a class="CheckAll" data-form="previous_auth" href="#"><i class="fa fa-check"></i> Select all visible rows</a> > <span class="sep">|</span> >- <a class="CheckNone" href="#"><i class="fa fa-remove"></i> Clear selection on visible rows</a> >+ <a class="CheckNone" data-form="previous_auth" href="#"><i class="fa fa-remove"></i> Clear selection on visible rows</a> > <span class="sep">|</span> > <span class="links"> > <span class="selections">Select searches to: </span> > <a href="#" class="action_delete disabled">Delete</a> > </span> >- </div> >+ </p> > <input type="hidden" name="action" value="delete" /> > <table class="historyt"> > <thead> >@@ -192,7 +200,6 @@ > > [% MACRO jsinclude BLOCK %] > [% INCLUDE 'datatables.inc' %] >- [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %] > <script> > $(document).ready(function() { > // We show table ordered by descending dates by default >@@ -234,15 +241,15 @@ > > $(".CheckNone").click(function(e){ > e.preventDefault(); >- var form = $(this).parents("form").first(); >- form.find('table input[type="checkbox"]').prop('checked', false); >- enableCheckboxActions(form); >+ var form = $(this).data("form"); >+ $("#" + form ).find('table input[type="checkbox"]').prop('checked', false); >+ enableCheckboxActions($("#" + form )); > }); > $(".CheckAll").click(function(e){ > e.preventDefault(); >- var form = $(this).parents("form").first(); >- form.find('table input[type="checkbox"]').prop('checked', true); >- enableCheckboxActions(form); >+ var form = $(this).data("form"); >+ $("#" + form ).find('table input[type="checkbox"]').prop('checked', true); >+ enableCheckboxActions($("#" + form )); > }); > > $('#tabs table').on('click', 'input:checkbox', function() { >-- >2.11.0
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 26769
:
112258
|
112399
|
112444