Bugzilla – Attachment 56313 Details for
Bug 14699
Intranet search history issues due to DataTables pagination
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14699: Reword "Select all/Clear all" and change their behaviour
Bug-14699-Reword-Select-allClear-all-and-change-th.patch (text/plain), 5.47 KB, created by
Julian Maurice
on 2016-10-13 09:12:52 UTC
(
hide
)
Description:
Bug 14699: Reword "Select all/Clear all" and change their behaviour
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2016-10-13 09:12:52 UTC
Size:
5.47 KB
patch
obsolete
>From 64fb591ab107568dd644c127a8256414b244f3c5 Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Thu, 13 Oct 2016 11:05:00 +0200 >Subject: [PATCH] Bug 14699: Reword "Select all/Clear all" and change their > behaviour > >"Select all" -> "Select all visible rows" >"Clear all" -> "Clear selection on visible rows" > >+ fix the bug where the Delete link was visually enabled only if you >checked a box in the first page (now every checkbox enable the link) >--- > .../prog/en/modules/catalogue/search-history.tt | 33 +++++++++++++--------- > 1 file changed, 19 insertions(+), 14 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 1ae68e7..f55d4fc 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 >@@ -25,7 +25,7 @@ $(document).ready(function() { > // DataTables removes hidden rows from the DOM, so we can't expect a > // "regular" submit to work and we need to build another form containing > // all form elements, and then submit this form. >- $('form').submit(function(e) { >+ $('#tabs form').submit(function(e) { > e.preventDefault(); > > var form = $(this); >@@ -49,19 +49,17 @@ $(document).ready(function() { > $(".CheckNone").click(function(e){ > e.preventDefault(); > var form = $(this).parents("form").first(); >- var table = form.find('table').dataTable(); >- table.$('input[type="checkbox"]').attr('checked', false); >+ form.find('table input[type="checkbox"]').prop('checked', false); > enableCheckboxActions(form); > }); > $(".CheckAll").click(function(e){ > e.preventDefault(); > var form = $(this).parents("form").first(); >- var table = form.find('table').dataTable(); >- table.$('input[type="checkbox"]').attr('checked', true); >+ form.find('table input[type="checkbox"]').prop('checked', true); > enableCheckboxActions(form); > }); > >- $("input:checkbox").click(function(){ >+ $('#tabs table').on('click', 'input:checkbox', function() { > var form = $(this).parents("form").first(); > enableCheckboxActions(form); > }); >@@ -88,6 +86,9 @@ $(document).ready(function() { > return false; > }); > >+ $('#tabs form').each(function() { >+ enableCheckboxActions($(this)); >+ }); > }); > > function enableCheckboxActions(form){ >@@ -136,8 +137,9 @@ function enableCheckboxActions(form){ > <h2>Current session</h2> > <form action="/cgi-bin/koha/catalogue/search-history.pl" method="get"> > <div class="selections-toolbar"> >- <a class="CheckAll" href="#">Select all</a> >- <a class="CheckNone" href="#">Clear all</a> >+ <a class="CheckAll" 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> > <span class="sep">|</span> > <span class="links"> > <span class="selections">Select searches to: </span> >@@ -172,8 +174,9 @@ function enableCheckboxActions(form){ > <h2>Previous sessions</h2> > <form action="/cgi-bin/koha/catalogue/search-history.pl" method="get"> > <div class="selections-toolbar"> >- <a class="CheckAll" href="#">Select all</a> >- <a class="CheckNone" href="#">Clear all</a> >+ <a class="CheckAll" 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> > <span class="sep">|</span> > <span class="links"> > <span class="selections">Select searches to: </span> >@@ -214,8 +217,9 @@ function enableCheckboxActions(form){ > <h2>Current session</h2> > <form action="/cgi-bin/koha/catalogue/search-history.pl" method="get"> > <div class="selections-toolbar"> >- <a class="CheckAll" href="#">Select all</a> >- <a class="CheckNone" href="#">Clear all</a> >+ <a class="CheckAll" 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> > <span class="sep">|</span> > <span class="links"> > <span class="selections">Select searches to: </span> >@@ -250,8 +254,9 @@ function enableCheckboxActions(form){ > <h2>Previous sessions</h2> > <form action="/cgi-bin/koha/catalogue/search-history.pl" method="get"> > <div class="selections-toolbar"> >- <a class="CheckAll" href="#">Select all</a> >- <a class="CheckNone" href="#">Clear all</a> >+ <a class="CheckAll" 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> > <span class="sep">|</span> > <span class="links"> > <span class="selections">Select searches to: </span> >-- >2.1.4
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 14699
:
41734
|
42330
|
42449
|
56313
|
57684
|
57685
|
57764
|
57765
|
57766