1 //z3950_search.js for Authorities, Bib records and Acquisitions module
2 function Import(Breeding, recordid, AuthType, FrameworkCode) {
4 if ( AuthType == false ) {
5 opener.document.location="../cataloguing/addbiblio.pl?biblionumber="+recordid+"&z3950=1&frameworkcode="+FrameworkCode+"&breedingid="+Breeding;
7 opener.document.location="../authorities/authorities.pl?breedingid="+Breeding+"&authtypecode="+AuthType+"&authid="+recordid;
14 $( document ).ready( function() {
16 $( "#CheckAll" ).click( function() {
17 $( ".checkboxed" ).checkCheckboxes();
20 $( "#CheckNone" ).click( function() {
21 $( ".checkboxed" ).unCheckCheckboxes();
24 $( "#close_menu" ).on( "click", function(e) {
26 $( ".linktools" ).hide();
27 $( "tr" ).removeClass( "selected" );
30 $( ".submit" ).on( "click", function() {
31 $( "body" ).css( "cursor", "wait" );
33 $( "[name='changepage_prev']" ).on( "click", function() {
34 var data_current_page_prev = $( this ).data( "currentpage" );
35 $( '#current_page' ).val( data_current_page_prev - 1 );
36 $( '#page_form' ).submit();
38 $( "[name='changepage_next']" ).on( "click", function() {
39 var data_current_page_next = $( this ).data( "currentpage" );
40 $( '#current_page' ).val( data_current_page_next + 1 );
41 $( '#page_form' ).submit();
43 $( "[name='changepage_goto']" ).on( "click", function() {
44 return validate_goto_page();
46 $( "#resetZ3950Search" ).click( function(e) {
48 $( "form[name='f']" ).find( "input[type=text]" ).val( "" );
50 $( "form[name='f']" ).submit( function() {
51 if ( $( 'input[type=checkbox]' ).filter( ':checked' ).length == 0 ) {
52 alert( MSG_CHOOSE_Z3950 );
53 $( "body" ).css( "cursor", "default" );
59 $( ".previewMARC" ).on( "click", function(e) {
61 var ltitle = $( this ).text();
62 var page = $( this ).attr( "href" );
63 $( "#marcPreviewLabel" ).text( ltitle );
64 $( "#marcPreview .modal-body" ).load( page + " pre" );
65 $( '#marcPreview' ).modal( {show:true} );
67 $( "#marcPreview" ).on( "hidden", function() {
68 $( "#marcPreviewLabel" ).html( "" );
69 $( "#marcPreview .modal-body" ).html( "<div id='loading'><img src='" + interface + "/" + theme + "/img/spinner-small.gif' alt='' /> " + MSG_LOADING + "</div>" );
71 $( ".previewData" ).on( "click", function(e) {
73 var ltitle = $( this ).text();
74 var page = $( this ).attr( "href" );
75 $( "#dataPreviewLabel" ).text( ltitle );
76 $( "#dataPreview .modal-body" ).load( page + " div" );
77 $( '#dataPreview' ).modal( {show:true} );
79 $( "#dataPreview" ).on( "hidden", function() {
80 $( "#dataPreviewLabel" ).html( "" );
81 $( "#dataPreview .modal-body" ).html( "<div id='loading'><img src='" + interface + "/" + theme + "/img/spinner-small.gif' alt='' /> " + MSG_LOADING + "</div>" );
83 $( ".import_record" ).on( "click", function(e) {
85 var data_breedingid = $( this ).data( "breedingid" );
86 var data_headingcode = $( this ).data( "heading_code" );
87 var data_authid = $( this ).data( "authid" );
88 var data_biblionumber = $( this ).data( "biblionumber" );
89 var data_frameworkcode = $( this ).data( "frameworkcode" );
90 if ( data_headingcode == undefined ) {
91 Import( data_breedingid, data_biblionumber, false , data_frameworkcode );
93 Import( data_breedingid, data_authid, data_headingcode );