Bugzilla – Attachment 39105 Details for
Bug 14189
Make text persist/populate hidden fields for the Staff searchbox
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14189 - Make text persist/populate hidden fields for the Staff searchbox
Fixed-so-the-text-persist-in-the-patron-search-als.patch (text/plain), 5.56 KB, created by
Eivin Giske Skaaren
on 2015-05-12 18:49:28 UTC
(
hide
)
Description:
Bug 14189 - Make text persist/populate hidden fields for the Staff searchbox
Filename:
MIME Type:
Creator:
Eivin Giske Skaaren
Created:
2015-05-12 18:49:28 UTC
Size:
5.56 KB
patch
obsolete
>From 5151fb71f30f89a02172a5104fba6f22b05e4ec4 Mon Sep 17 00:00:00 2001 >From: Eivin Giske Skaaren <eskaaren@yahoo.no> >Date: Tue, 12 May 2015 18:03:25 +0000 >Subject: [PATCH] Fixed so the text persist in the patron search also > >http://bugs.koha-community.org/show_bug.cgi?id=14189 >--- > .../prog/en/includes/patron-search-box.inc | 2 +- > .../prog/en/includes/patron-search.inc | 15 +++++------ > .../prog/en/includes/searchbox-keep-text.inc | 26 ++++++++++++++++++++ > 3 files changed, 35 insertions(+), 8 deletions(-) > create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/searchbox-keep-text.inc > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search-box.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search-box.inc >index f3c37da..2b93441 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search-box.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search-box.inc >@@ -36,7 +36,7 @@ $(document).ready(function(){ > [% END %] > </div> > [% ELSE %] >- <input id="findborrower" name="findborrower" size="40" class="focus" type="text" /> >+ <input id="findborrower" name="findborrower" size="40" class="query focus" type="text" /> > <input name="branch" value="[% branch %]" type="hidden" /> > <input name="printer" value="" type="hidden" /> > [% IF ( stickyduedate ) %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc >index 7739cc3..8a7d662 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc >@@ -5,7 +5,7 @@ > <div id="patron_search" class="residentsearch"> > <p class="tip">Enter patron card number or partial name:</p> > <form action="/cgi-bin/koha/members/member.pl" method="post"> >- <input id="searchmember" data-toggle="tooltip" size="25" class="focus" name="searchmember" type="text" value="[% searchmember %]"/> >+ <input id="searchmember" data-toggle="tooltip" size="25" class="query focus" name="searchmember" type="text" value="[% searchmember %]"/> > <input type="hidden" name="quicksearch" value="1" /> > <span class="filteraction" id="filteraction_off"> <a href="#">[-]</a></span> > <span class="filteraction" id="filteraction_on"> <a href="#">[+]</a></span> >@@ -103,7 +103,7 @@ > <div id="catalog_search" class="residentsearch"> > <p class="tip">Enter search keywords:</p> > <form action="/cgi-bin/koha/catalogue/search.pl" method="get" id="cat-search-block"> >- <input type="text" name="q" id="search-form" size="40" value="" title="Enter the terms you wish to search for." class="form-text" /> >+ <input type="text" name="q" id="search-form" size="40" value="" title="Enter the terms you wish to search for." class="query form-text" /> > <input type="submit" name="op" id="opac-submit" value="Submit" class="submit" /> > </form> > </div>[% END %] >@@ -111,19 +111,20 @@ > <div id="checkin_search" class="residentsearch"> > <p class="tip">Scan a barcode to check in:</p> > <form method="post" action="/cgi-bin/koha/circ/returns.pl" autocomplete="off"> >- <input name="barcode" id="ret_barcode" size="40" accesskey="r" /> >+ <input class="query" name="barcode" id="ret_barcode" size="40" accesskey="r" /> > <input value="Submit" class="submit" type="submit" /> > </form> > </div> > [% END %] > <ul> >- <li><a href="#patron_search">Search patrons</a></li> >- [% IF ( CAN_user_circulate ) %]<li><a href="#circ_search">Check out</a></li>[% END %] >- [% IF ( CAN_user_circulate ) %]<li><a href="#checkin_search">Check in</a></li>[% END %] >- [% IF ( CAN_user_catalogue ) %]<li><a href="#catalog_search">Search the catalog</a></li>[% END %] >+ <li><a onclick="keep_text()" href="#patron_search">Search patrons</a></li> >+ [% IF ( CAN_user_circulate ) %]<li><a onclick="keep_text()" href="#circ_search">Check out</a></li>[% END %] >+ [% IF ( CAN_user_circulate ) %]<li><a onclick="keep_text()" href="#checkin_search">Check in</a></li>[% END %] >+ [% IF ( CAN_user_catalogue ) %]<li><a onclick="keep_text()" href="#catalog_search">Search the catalog</a></li>[% END %] > </ul> > </div><!-- /header_search --> > </div><!-- /gradient --> >+[% INCLUDE 'searchbox-keep-text.inc' %] > <script type="text/javascript">//<![CDATA[ > $(document).ready(function() { > $("#filteraction_off, #filteraction_on").on('click', function(e) { >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/searchbox-keep-text.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/searchbox-keep-text.inc >new file mode 100644 >index 0000000..6670a3d >--- /dev/null >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/searchbox-keep-text.inc >@@ -0,0 +1,26 @@ >+<script type="text/javascript"> >+//<![CDATA[ >+function keep_text() { >+ var queries = document.getElementsByClassName("query"); >+ var persist = queries[0].value; >+ >+ for (i = 0; i < queries.length - 1; i++) { >+ if (queries[i].value != queries[i+1].value) { >+ if (i === queries.length-2) { >+ if (queries[i].value != queries[0].value) { >+ persist = queries[i].value; >+ } else { >+ persist = queries[i+1].value; >+ } >+ } else if (queries[i+1].value != queries[i+2].value) { >+ persist = queries[i+1].value; >+ } >+ } >+ } >+ >+ for (i = 0; i < queries.length; i++) { >+ queries[i].value = persist; >+ } >+} >+//]]> >+</script> >-- >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 14189
:
39104
|
39105
|
39106
|
39107
|
39108
|
39110
|
39112
|
39462
|
39505
|
39506
|
39543
|
39587
|
39588