Bug 40298: define select2 parent in patron search modal
The patron search modal in the patron card creator -> new batch -> patron search has two select2 modals, sort1 and sort2. If these are not anchored to the modal they will be anchored to the body element and appear behind the modal. To test, apply the patch and go to Tools -> Patron card creator -> New -> Card batch. - Click "Add patron(s)" - Test the "Sort 1" and "Sort 2" dropdowns. They should work correctly. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> (cherry picked from commit20313df192) Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> (cherry picked from commit4afb657fe8) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
parent
0cefc3ad2c
commit
f002931186
|
|
@ -286,8 +286,8 @@
|
|||
[% END %]
|
||||
|
||||
$(document).on("shown.bs.modal", function(){
|
||||
$('select[name="sort1_filter"]').select2({allowClear:true});
|
||||
$('select[name="sort2_filter"]').select2({allowClear:true});
|
||||
$('select[name="sort1_filter"]').select2({allowClear:true,dropdownParent:$('#patron_search_modal')});
|
||||
$('select[name="sort2_filter"]').select2({allowClear:true,dropdownParent:$('#patron_search_modal')});
|
||||
}).on("hidden.bs.modal", function(){
|
||||
["sort1_filter", "sort2_filter"].forEach(function(item){
|
||||
if( $('select[name=' + item + ']').data("select2") ){
|
||||
|
|
|
|||
Loading…
Reference in New Issue