|
Lines 52-63
function Check_page1() {
Link Here
|
| 52 |
return false; |
52 |
return false; |
| 53 |
} |
53 |
} |
| 54 |
} |
54 |
} |
| 55 |
if ($("#biblionumber").val().length == 0) { |
55 |
|
|
|
56 |
var biblionumber = $("#biblionumber").val() |
| 57 |
if ( biblionumber.length == 0 ) { |
| 56 |
alert( MSG_LINK_BIBLIO ); |
58 |
alert( MSG_LINK_BIBLIO ); |
| 57 |
return false; |
59 |
return false; |
| 58 |
} |
60 |
} |
| 59 |
|
61 |
|
| 60 |
return true; |
62 |
var bib_exists = $("input[name='title']").val().length; |
|
|
63 |
|
| 64 |
if (!bib_exists) alert(_("Bibliographic record does not exist!")); |
| 65 |
return bib_exists; |
| 61 |
} |
66 |
} |
| 62 |
|
67 |
|
| 63 |
function Check_page2(){ |
68 |
function Check_page2(){ |
|
Lines 694-697
$(document).ready(function() {
Link Here
|
| 694 |
e.preventDefault(); |
699 |
e.preventDefault(); |
| 695 |
hidePredcitionPatternTest(); |
700 |
hidePredcitionPatternTest(); |
| 696 |
}); |
701 |
}); |
|
|
702 |
|
| 703 |
$("#biblionumber").on("change", function(){ |
| 704 |
var biblionumber = $(this).val(); |
| 705 |
$.ajax({ |
| 706 |
url: "/api/v1/biblios/" + biblionumber, |
| 707 |
type: "GET", |
| 708 |
headers: { |
| 709 |
Accept: "application/json", |
| 710 |
}, |
| 711 |
contentType: "application/json", |
| 712 |
success: function (biblio) { |
| 713 |
$("input[name='title']").val(biblio['title']); |
| 714 |
$("#error_bib_not_exist").html(""); |
| 715 |
}, |
| 716 |
error: function (x) { |
| 717 |
$("input[name='title']").val(''); |
| 718 |
$("#error_bib_not_exist").html("This bibliographic record does not exist"); |
| 719 |
} |
| 720 |
}); |
| 721 |
}); |
| 722 |
|
| 697 |
}); |
723 |
}); |
| 698 |
- |
|
|