Bug 33655: z39.50 search no longer shows search in progress

This patch adds an id to z39.50 search interface submit buttons so that
the JavaScript event for changing the cursor can be linked to that
instead of the obsolete class.

The patch also adds code copied from Bug 33233 in order to make the
"waiting" cursor revert to the default if the user uses the back button
to return to the search form.

To test, apply the patch and go to Cataloging -> New from Z39.50

- Fill in a search term and click the submit button
- Your cursor should change to a "waiting" cursor while the search is
  performed, before you're redirected to the results.
- From the results page, clicking the back button (or right-clicking the
  page and choosing "Back") should return you to the search form and
  your cursor should be a standard pointer.

Perform the same test from:

- Acquisitions -> Vendor -> Basket -> Add to basket -> From an external
  source
- Authorities -> New from Z39.50/SRU

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5d6f0723ce)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
This commit is contained in:
Owen Leonard 2023-05-10 10:42:13 +00:00 committed by Matt Blenkinsop
parent 42b8f60bf4
commit e35e1b5869
4 changed files with 15 additions and 4 deletions

View file

@ -139,7 +139,10 @@ tr.selected td {
<div class="row">
<div class="col-md-12">
<fieldset class="action"><input type="submit" class="btn btn-primary" value="Search" /> <a class="cancel" href="/cgi-bin/koha/acqui/basket.pl?booksellerid=[% booksellerid | uri %]&amp;basketno=[% basketno | uri %]">Cancel</a></fieldset>
<fieldset class="action">
<input type="submit" id="submit_z3950_search" class="btn btn-primary" value="Search" />
<a class="cancel" href="/cgi-bin/koha/acqui/basket.pl?booksellerid=[% booksellerid | uri %]&amp;basketno=[% basketno | uri %]">Cancel</a>
</fieldset>
</div>
</div>
</form>

View file

@ -68,7 +68,8 @@
</div>
<nav class="navbar navbar-default navbar-fixed-bottom">
<div class="container-fluid">
<fieldset class="action"><input type="submit" class="btn btn-primary" value="Search" /> <a class="cancel close" href="#">Cancel</a></fieldset>
<fieldset class="action"><input type="submit" id="submit_z3950_search" class="btn btn-primary" value="Search" />
<a class="cancel close" href="#">Cancel</a></fieldset>
</div>
</nav>
</form>

View file

@ -108,7 +108,10 @@
<nav class="navbar navbar-default navbar-fixed-bottom">
<div class="container-fluid">
<fieldset class="action"><input type="submit" class="btn btn-primary" value="Search" /> <a class="cancel close" href="#">Cancel</a></fieldset>
<fieldset class="action">
<input type="submit" id="submit_z3950_search" class="btn btn-primary" value="Search" />
<a class="cancel close" href="#">Cancel</a>
</fieldset>
</div>
</nav>
</form> <!-- /.checkboxed -->

View file

@ -16,6 +16,10 @@ function validate_goto_page() {
}
}
window.addEventListener('pageshow', function( e ){
$('body').css("cursor", "default");
});
$( document ).ready( function() {
$( "#CheckAll" ).click( function(e) {
@ -27,7 +31,7 @@ $( document ).ready( function() {
$( ".checkboxed input:checkbox" ).prop("checked", false);
});
$( ".submit" ).on( "click", function() {
$( "#submit_z3950_search" ).on( "click", function() {
$( "body" ).css( "cursor", "wait" );
});
$( "[name='changepage_prev']" ).on( "click", function() {