Lines 14-20
Link Here
|
14 |
var browser = KOHA.browser('[% searchid %]', parseInt('[% biblionumber %]', 10)); |
14 |
var browser = KOHA.browser('[% searchid %]', parseInt('[% biblionumber %]', 10)); |
15 |
browser.show(); |
15 |
browser.show(); |
16 |
|
16 |
|
|
|
17 |
//Fetch the Shelving locations using AJAX |
18 |
//Build the replacement HTML for the shelving location options |
19 |
//Then replace the existing HTML with this. |
20 |
function reloadShelvingLocations(homebranch) { |
21 |
|
22 |
$.ajax({ |
23 |
url: "/cgi-bin/koha/svc/getAuthorisedValues.pl", |
24 |
type: "POST", |
25 |
dataType: 'json', |
26 |
data: { 'category' : 'LOC', 'branch_limit' : homebranch }, |
27 |
success: function(data, textStatus, jqXHR) { |
28 |
|
29 |
var html_replacement = '<option value="" selected="selected"></option>\n'; |
30 |
for (var i in data) { |
31 |
html_replacement += '<option value="'+data[i].authorised_value+'">'+data[i].lib+'</option>\n'; |
32 |
} |
33 |
$("select[id*='tag_952_subfield_c']").html(html_replacement); |
34 |
} |
35 |
}); |
36 |
} |
37 |
|
38 |
|
17 |
$(document).ready(function(){ |
39 |
$(document).ready(function(){ |
|
|
40 |
|
41 |
//Reload shelving location with AJAX if the "Permanent location" (homebranch) changes. |
42 |
$("select[id*='tag_952_subfield_a']").change(function() { |
43 |
reloadShelvingLocations(this.value); |
44 |
}); |
45 |
|
46 |
|
18 |
[% IF (popup) %] |
47 |
[% IF (popup) %] |
19 |
[% IF (opisadd) %] |
48 |
[% IF (opisadd) %] |
20 |
window.close(); |
49 |
window.close(); |
21 |
- |
|
|