Lines 7-13
Link Here
|
7 |
// Elements we work frequently with |
7 |
// Elements we work frequently with |
8 |
var textarea = document.getElementById("identifiers_input"); |
8 |
var textarea = document.getElementById("identifiers_input"); |
9 |
var nameInput = document.getElementById("name"); |
9 |
var nameInput = document.getElementById("name"); |
10 |
var cardnumberInput = document.getElementById("cardnumber"); |
10 |
var cardnumberInput = document.getElementById("batchcardnumber"); |
11 |
var branchcodeSelect = document.getElementById("branchcode"); |
11 |
var branchcodeSelect = document.getElementById("branchcode"); |
12 |
var processButton = document.getElementById("process_button"); |
12 |
var processButton = document.getElementById("process_button"); |
13 |
var createButton = document.getElementById("button_create_batch"); |
13 |
var createButton = document.getElementById("button_create_batch"); |
Lines 22-27
Link Here
|
22 |
var statusesSelect = document.getElementById('statuscode'); |
22 |
var statusesSelect = document.getElementById('statuscode'); |
23 |
|
23 |
|
24 |
|
24 |
|
|
|
25 |
// Bail if there aren't any metadata enrichment plugins installed |
26 |
if (typeof metadata_enrichment_services === 'undefined') { |
27 |
return; |
28 |
} |
25 |
// We need a data structure keyed on identifier type, which tells us how to parse that |
29 |
// We need a data structure keyed on identifier type, which tells us how to parse that |
26 |
// identifier type and what services can get its metadata. We receive an array of |
30 |
// identifier type and what services can get its metadata. We receive an array of |
27 |
// available services |
31 |
// available services |
Lines 1031-1053
Link Here
|
1031 |
} |
1035 |
} |
1032 |
|
1036 |
|
1033 |
function patronAutocomplete() { |
1037 |
function patronAutocomplete() { |
1034 |
// Add autocomplete for patron selection |
1038 |
patron_autocomplete( |
1035 |
$('#batch-form #cardnumber').autocomplete({ |
1039 |
$('#batch-form #batchcardnumber'), |
1036 |
appendTo: '#batch-form', |
1040 |
{ |
1037 |
source: "/cgi-bin/koha/circ/ysearch.pl", |
1041 |
'on-select-callback': function( event, ui ) { |
1038 |
minLength: 3, |
1042 |
$("#batch-form #batchcardnumber").val( ui.item.patron_id ); |
1039 |
select: function (event, ui) { |
|
|
1040 |
var field = ui.item.cardnumber; |
1041 |
$('#batch-form #cardnumber').val(field) |
1042 |
return false; |
1043 |
return false; |
|
|
1044 |
} |
1043 |
} |
1045 |
} |
1044 |
}) |
1046 |
); |
1045 |
.data("ui-autocomplete")._renderItem = function (ul, item) { |
|
|
1046 |
return $("<li></li>") |
1047 |
.data("ui-autocomplete-item", item) |
1048 |
.append("<a>" + item.surname + ", " + item.firstname + " (" + item.cardnumber + ") <small>" + item.address + " " + item.city + " " + item.zipcode + " " + item.country + "</small></a>") |
1049 |
.appendTo(ul); |
1050 |
}; |
1051 |
}; |
1047 |
}; |
1052 |
|
1048 |
|
1053 |
function createPatronLink() { |
1049 |
function createPatronLink() { |
1054 |
- |
|
|