Bug 34169: Use jQuery validator plugin to validate amounts
[koha.git] / koha-tmpl / intranet-tmpl / prog / js / authorities-detail-modal.js
1 /* global template_path */
2 $(document).ready(function(){
3     $(".authority_preview a").on("click", function(e){
4         e.preventDefault();
5         var authid = $(this).data("authid");
6
7         $.get("/cgi-bin/koha/authorities/detail.pl", { authid : authid }, function( data ){
8             var auth_detail = $(data).find("#authoritiestabs");
9             auth_detail.find("ul").remove();
10             auth_detail.removeClass("toptabs");
11             auth_detail.find("> div").removeClass("tab-content");
12             auth_detail.find("> div > div").removeClass("tab-pane").removeAttr("role");
13             $("#authorityDetail .modal-title").html(__("Authority") + " " + authid );
14             $("#authorityDetail .modal-body").html( auth_detail );
15         });
16
17         $("#authorityDetail").modal("show");
18     });
19     $("#authorityDetail").on("hidden.bs.modal", function(){
20         $("#authorityDetail .modal-body, #authorityDetail .modal-title").html("");
21         $("#authorityDetail .modal-body").html("<img src=\"" + template_path + "/img/spinner-small.gif\" alt=\"\" />");
22     });
23 });