Owen Leonard
7b6107beaf
Modals in the staff client which load data via AJAX require an "on close" action in order to clear the modal of the loaded data. The problem presents itself the second time the modal is opened: The "loading" message doesn't appear, and the data from the previous link is shown until the new data loads. To test, apply the patch and test the following pages. In each case, click multiple instances of the modal trigger link/button to confirm that the "loading" message always appears between re-displays of the modal. - Acquisitions -> Vendor -> Add to basket -> From a staged file -> Add orders - Test the "MARC" and "Card" links - Acquisitions -> EDIFACT messages - Test the "View message" button - Acquisitions -> Vendor -> Add to basket -> From an existing record - Test "View MARC" link - Acquisitions -> Vendor -> Invoices -> Invoice -> Receipt page - Test the "Order," "MARC," and "Card" links. - Catalog -> Bibliographic record details - Test the MARC Preview link. - Cataloging -> Cataloging search results - Test the Actions -> MARC preview and Actions -> Card preview menu items - Cataloging -> Cataloging search results -> Merge - Test the "View MARC" linkscataloguing/merge.tt - Tools -> Patron lists -> Actions -> Print patron cards - Tools -> Batch record modification -> Results -> Show MARC - Tools -> Staged MARC record management -> View batch - Test MARC preview shown when you click a staged title Signed-off-by: Cori Lynn Arnold <carnold@dgiinc.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
141 lines
5.4 KiB
Text
141 lines
5.4 KiB
Text
[% USE raw %]
|
||
[% USE Asset %]
|
||
[% SET footerjs = 1 %]
|
||
[% INCLUDE 'doc-head-open.inc' %]
|
||
<title>Koha › Acquisitions › Search existing records</title>
|
||
[% Asset.css("css/datatables.css") | $raw %]
|
||
[% INCLUDE 'doc-head-close.inc' %]
|
||
</head>
|
||
|
||
<body id="acq_neworderbiblio" class="acq">
|
||
[% INCLUDE 'header.inc' %]
|
||
[% INCLUDE 'acquisitions-search.inc' %]
|
||
|
||
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> › <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | html %]">[% name | html %]</a> › <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno | html %]">Basket [% basketno | html %]</a> › Search existing records</div>
|
||
|
||
<div class="main container-fluid">
|
||
<div class="row">
|
||
<div class="col-sm-10 col-sm-push-2">
|
||
<main>
|
||
|
||
<h1>Search existing records</h1>
|
||
|
||
|
||
[% IF ( total ) %]
|
||
<b>[% total | html %] results found </b>
|
||
<div class="pages">[% pagination_bar | $raw %]</div>
|
||
[% ELSE %]
|
||
<h3> No results found</h3>
|
||
<p>
|
||
No results match your search for <span style="font-weight: bold;">“[% query | html %]”</span> in [% LibraryName | html %]
|
||
</p>
|
||
[% END %]
|
||
|
||
[% IF ( query_error ) %]
|
||
<div class="dialog alert"><p><strong>Error:</strong> [% query_error | html %]</p></div>
|
||
[% END %]
|
||
|
||
[% IF ( total ) %]
|
||
<div class="searchresults">
|
||
<table id="resultst">
|
||
<thead>
|
||
<tr>
|
||
<th>Summary</th>
|
||
<th>Publisher</th>
|
||
<th>Copyright</th>
|
||
<th> </th>
|
||
<th> </th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
[% FOREACH biblio IN resultsloop %]
|
||
<tr>
|
||
<td>
|
||
<p><span class="title"><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblio.biblionumber | uri %]">[% biblio.title | html %]</a></span>
|
||
[% FOREACH subtitle IN biblio.subtitles %] <span class="subtitle">[% subtitle.subfield | html %]</span>[% END %]
|
||
[% IF ( biblio.author ) %] by <span class="author">[% biblio.author | html %]</span>,[% END %]</p>
|
||
<p>[% IF ( biblio.isbn ) %] [% biblio.isbn | html %][% END %]
|
||
[% IF ( biblio.pages ) %] - [% biblio.pages | html %][% END %]
|
||
[% IF ( biblio.notes ) %] : [% biblio.notes | html %][% END %]
|
||
[% IF ( biblio.size ) %] ; [% biblio.size | html %][% END %]
|
||
</p>
|
||
</td>
|
||
<td>
|
||
[% biblio.publishercode | html %]
|
||
[% IF ( biblio.place ) %] ; [% biblio.place | html %][% END %]
|
||
</td>
|
||
<td>
|
||
[% biblio.copyrightdate | html %]
|
||
</td>
|
||
<td>
|
||
<a href="/cgi-bin/koha/catalogue/showmarc.pl?id=[% biblio.biblionumber | uri %]&viewas=html" class="btn btn-default btn-xs previewMARC">View MARC</a>
|
||
</td>
|
||
<td>
|
||
<a href="/cgi-bin/koha/acqui/neworderempty.pl?booksellerid=[% booksellerid | uri %]&basketno=[% basketno | uri %]&biblionumber=[% biblio.biblionumber | uri %]" class="btn btn-default btn-xs" title="Order this one">
|
||
Order
|
||
</a>
|
||
</td>
|
||
</tr>
|
||
[% END %]
|
||
</tbody>
|
||
</table>
|
||
<div id="marcPreview" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="marcPreviewLabel" aria-hidden="true">
|
||
<div class="modal-dialog modal-wide">
|
||
<div class="modal-content">
|
||
<div class="modal-header">
|
||
<button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
|
||
<h3 id="marcPreviewLabel">MARC preview</h3>
|
||
</div>
|
||
<div class="modal-body">
|
||
<div id="loading"> <img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /> Loading </div>
|
||
</div>
|
||
<div class="modal-footer">
|
||
<button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Close</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
[% END %]
|
||
|
||
[% INCLUDE 'acquisitions-add-to-basket.inc' %]
|
||
|
||
</main>
|
||
</div> <!-- /.col-sm-10.col-sm-push-2 -->
|
||
|
||
<div class="col-sm-2 col-sm-pull-10">
|
||
<aside>
|
||
[% INCLUDE 'acquisitions-menu.inc' %]
|
||
</aside>
|
||
</div> <!-- /.col-sm-2.col-sm-pull-10 -->
|
||
</div> <!-- /.row -->
|
||
|
||
[% MACRO jsinclude BLOCK %]
|
||
[% Asset.js("js/acquisitions-menu.js") | $raw %]
|
||
[% INCLUDE 'datatables.inc' %]
|
||
<script>
|
||
$(document).ready(function() {
|
||
var resultst = $("#resultst").dataTable($.extend(true, {}, dataTablesDefaults, {
|
||
'sDom': 't',
|
||
'bPaginate': false,
|
||
'bFilter': false,
|
||
'bInfo': false,
|
||
'bSort': false,
|
||
} ) );
|
||
$(".previewMARC").on("click", function(e){
|
||
e.preventDefault();
|
||
var ltitle = $(this).text();
|
||
var page = $(this).attr("href");
|
||
$("#marcPreviewLabel").text(ltitle);
|
||
$("#marcPreview .modal-body").load(page + " table");
|
||
$('#marcPreview').modal({show:true});
|
||
});
|
||
$("#marcPreview").on("hidden.bs.modal", function(){
|
||
$("#marcPreviewLabel").html("");
|
||
$("#marcPreview .modal-body").html("<div id=\"loading\"><img src=\"[% interface | html %]/[% theme | html %]/img/spinner-small.gif\" alt=\"\" /> "+_("Loading")+"</div>");
|
||
});
|
||
});
|
||
</script>
|
||
[% END %]
|
||
|
||
[% INCLUDE 'intranet-bottom.inc' %]
|