6123c2767d
This patch makes the contents of the MARC preview for authority search results visible. To test: 1) Go to the Authorities page in the staff interface 2) Click Submit to do a search 3) Click on Actions to the right of an authority 4) Select MARC preview 5) Observe that the modal appears empty 6) Apply patch 7) Hold down the shift key when you reload the page, clear the cache, or use another web browser 8) Do another authority search and look at a MARC preview 9) Observe that the MARC preview contains the MARC record Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22 lines
1.1 KiB
JavaScript
22 lines
1.1 KiB
JavaScript
$(document).ready(function(){
|
|
$(".authority_preview a").on("click", function(e){
|
|
e.preventDefault();
|
|
var authid = $(this).data("authid");
|
|
|
|
$.get("/cgi-bin/koha/authorities/detail.pl", { authid : authid }, function( data ){
|
|
var auth_detail = $(data).find("#authoritiestabs");
|
|
auth_detail.find("ul").remove();
|
|
auth_detail.removeClass("toptabs");
|
|
auth_detail.find("> div").removeClass("tab-content");
|
|
auth_detail.find("> div > div").removeClass("tab-pane").removeAttr("role");
|
|
$("#authorityDetail .modal-title").html(__("Authority") + " " + authid );
|
|
$("#authorityDetail .modal-body").html( auth_detail );
|
|
});
|
|
|
|
$("#authorityDetail").modal("show");
|
|
});
|
|
$("#authorityDetail").on("hidden.bs.modal", function(){
|
|
$("#authorityDetail .modal-body, #authorityDetail .modal-title").html("");
|
|
$("#authorityDetail .modal-body").html("<div id=\"loading\"><img src=\"[% interface | html %]/[% theme | html %]/img/spinner-small.gif\" alt=\"\" /></div>");
|
|
});
|
|
});
|