Lines 19-24
Link Here
|
19 |
</head> |
19 |
</head> |
20 |
|
20 |
|
21 |
<body id="circ_request" class="catalog"> |
21 |
<body id="circ_request" class="catalog"> |
|
|
22 |
<script> |
23 |
var select2Width = "100%"; |
24 |
</script> |
22 |
[% INCLUDE 'header.inc' %] |
25 |
[% INCLUDE 'header.inc' %] |
23 |
[% INCLUDE 'circ-search.inc' %] |
26 |
[% INCLUDE 'circ-search.inc' %] |
24 |
|
27 |
|
Lines 985-991
Link Here
|
985 |
[% INCLUDE 'columns_settings.inc' %] |
988 |
[% INCLUDE 'columns_settings.inc' %] |
986 |
[% Asset.js("lib/hc-sticky.js") | $raw %] |
989 |
[% Asset.js("lib/hc-sticky.js") | $raw %] |
987 |
[% Asset.js("js/circ-patron-search-results.js") | $raw %] |
990 |
[% Asset.js("js/circ-patron-search-results.js") | $raw %] |
988 |
[% Asset.js("js/holds.js") | $raw %] |
991 |
[% INCLUDE 'select2.inc' %] |
989 |
<script> |
992 |
<script> |
990 |
var Sticky; |
993 |
var Sticky; |
991 |
var biblionumber = "[% biblionumber | $raw %]"; |
994 |
var biblionumber = "[% biblionumber | $raw %]"; |
Lines 1150-1155
Link Here
|
1150 |
}); |
1153 |
}); |
1151 |
[% END %] |
1154 |
[% END %] |
1152 |
|
1155 |
|
|
|
1156 |
$(".pickup_location_dropdown").each( function () { |
1157 |
var this_dropdown = $(this); |
1158 |
var hold_id = $(this).data('hold_id'); |
1159 |
|
1160 |
this_dropdown.select2({ |
1161 |
ajax: { |
1162 |
url: '/api/v1/holds/' + encodeURIComponent(hold_id) + '/pickup_locations', |
1163 |
allowClear: false, |
1164 |
delay: 300, // wait 300 milliseconds before triggering the request |
1165 |
dataType: 'json', |
1166 |
data: function (params) { |
1167 |
var search_term = (params.term === undefined) ? '' : params.term; |
1168 |
var query = { |
1169 |
"q": JSON.stringify({"name":{"-like":search_term+'%'}}) |
1170 |
}; |
1171 |
return query; |
1172 |
}, |
1173 |
processResults: function (data) { |
1174 |
var results = []; |
1175 |
data.forEach( function ( library ) { |
1176 |
results.push( |
1177 |
{ |
1178 |
"id": library.library_id.escapeHtml(), |
1179 |
"text": library.name.escapeHtml() |
1180 |
} |
1181 |
); |
1182 |
}); |
1183 |
return { "results": results }; |
1184 |
} |
1185 |
} |
1186 |
}); |
1187 |
}); |
1153 |
}); |
1188 |
}); |
1154 |
|
1189 |
|
1155 |
function check() { |
1190 |
function check() { |