Bugzilla – Attachment 21175 Details for
Bug 9811
Patrons search improvements
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9811: Load the page without any data.
Bug-9811-Load-the-page-without-any-data.patch (text/plain), 3.81 KB, created by
Jonathan Druart
on 2013-09-18 11:47:39 UTC
(
hide
)
Description:
Bug 9811: Load the page without any data.
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2013-09-18 11:47:39 UTC
Size:
3.81 KB
patch
obsolete
>From 60a9b5f55fc0b0c795f79081484cee1f3b9514ae Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Tue, 13 Aug 2013 11:40:12 +0200 >Subject: [PATCH] Bug 9811: Load the page without any data. > >Displaying the first 20 patrons is not useful. With this patch, the >table is hidden and no record is retrieved by default. >On the same way, the existing side effect on redirect disappears. >--- > .../prog/en/modules/members/member.tt | 23 ++++++++++++++++---- > members/member.pl | 3 +++ > 2 files changed, 22 insertions(+), 4 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt >index 5aa0009..6ce41f7 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt >@@ -8,6 +8,7 @@ > <script type="text/javascript"> > //<![CDATA[ > var dtMemberResults; >+ var search = 1; > > $(document).ready(function() { > [% IF searchmember %] >@@ -26,6 +27,11 @@ > $("#branchcode_filter").val("[% branchcode %]"); > [% END %] > >+ [% IF view != "show_results" %] >+ $("#searchresults").hide(); >+ search = 0; >+ [% END %] >+ > // Build the aLengthMenu > var aLengthMenu = [ > [%PatronsPerPage %], 10, 20, 50, 100 >@@ -38,6 +44,9 @@ > 'bServerSide': true, > 'sAjaxSource': "/cgi-bin/koha/svc/members/search", > 'fnServerData': function(sSource, aoData, fnCallback) { >+ if ( ! search ) { >+ return; >+ } > aoData.push({ > 'name': 'searchmember', > 'value': $("#searchmember_filter").val() >@@ -144,6 +153,8 @@ > function filter() { > $("#firstletter_filter").val(''); > update_searched(); >+ search = 1; >+ $("#searchresults").show(); > dtMemberResults.fnDraw(); > return false; > } >@@ -154,6 +165,8 @@ > $("#firstletter_filter").val(''); > $("#searchmember_filter").val(''); > if(redraw) { >+ search = 1; >+ $("#searchresults").show(); > dtMemberResults.fnDraw(); > } > } >@@ -162,6 +175,8 @@ > function filterByFirstLetterSurname(letter) { > clearFilters(false); > $("#firstletter_filter").val(letter); >+ search = 1; >+ $("#searchresults").show(); > dtMemberResults.fnDraw(); > } > //]]> >@@ -204,10 +219,10 @@ > </div> > [% END %] > >- <div id="searchheader"> >- <h3>Results found <span id="searchpattern">[% IF searchmember %] for '[% searchmember %]'[% END %]</span></h3> >- </div> >- <div class="searchresults"> >+ <div id="searchresults"> >+ <div id="searchheader"> >+ <h3>Results found <span id="searchpattern">[% IF searchmember %] for '[% searchmember %]'[% END %]</span></h3> >+ </div> > <table id="memberresultst"> > <thead> > <tr> >diff --git a/members/member.pl b/members/member.pl >index bc23c84..bce9685 100755 >--- a/members/member.pl >+++ b/members/member.pl >@@ -95,6 +95,8 @@ if(defined $orderby and $orderby ne '') { > $orderby =~ s/[, ]/_/g; > } > >+my $view = $input->request_method() eq "GET" ? "show_form" : "show_results"; >+ > $template->param( > searchmember => $searchmember, > branchloop => \@branches_loop, >@@ -105,6 +107,7 @@ $template->param( > searchfieldstype => $searchfieldstype, > "orderby_$orderby" => 1, > PatronsPerPage => C4::Context->preference("PatronsPerPage") || 20, >+ view => $view, > ); > > output_html_with_http_headers $input, $cookie, $template->output; >-- >1.7.10.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 9811
:
16096
|
16111
|
16112
|
16320
|
16362
|
16403
|
16957
|
19056
|
19057
|
19307
|
19633
|
19642
|
20094
|
20095
|
20096
|
20174
|
20266
|
20290
|
20291
|
21169
|
21170
|
21171
|
21172
|
21173
|
21174
|
21175
|
22265
|
23261
|
24095
|
24111
|
26067
|
26068
|
26261
|
26336
|
26337
|
26342
|
26347
|
27642
|
27643
|
27644
|
27645
|
27646
|
27711
|
28738
|
28739
|
28740
|
28741
|
28742
|
28743
|
28744
|
28745
|
28746
|
28747
|
28781
|
28782
|
29019
|
29020
|
29021
|
29022
|
29023
|
29024
|
29025
|
29026
|
29027
|
29028
|
29029
|
29442