mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-07 13:44:23 +08:00
Fix bootstrap-select to work with turbolinks 5.x
This was causing invite users modal, among other things, to not function correctly after visiting another redirect within SciNote using Turbolinks 5.x. Closes SCI-2707.
This commit is contained in:
parent
10a650c3c5
commit
b71c5d14c6
2 changed files with 12 additions and 4 deletions
|
@ -262,4 +262,9 @@ var HelperModule = (function(){
|
|||
$('.modal').modal('hide');
|
||||
});
|
||||
});
|
||||
})();
|
||||
|
||||
/* Fix .selectpicker (bootstrap-select) to work with Turbolinks 5.x */
|
||||
$(document).on('turbolinks:load', function() {
|
||||
$(window).trigger('load.bs.select.data-api');
|
||||
});
|
||||
})();
|
|
@ -173,8 +173,11 @@
|
|||
});
|
||||
}
|
||||
|
||||
$('[data-role=invite-users-modal]').each(function() {
|
||||
initializeModal($(this));
|
||||
$(document).on('turbolinks:load', function() {
|
||||
$('[data-role=invite-users-modal]').each(function() {
|
||||
initializeModal($(this));
|
||||
});
|
||||
|
||||
initializeModalsToggle();
|
||||
});
|
||||
initializeModalsToggle();
|
||||
}());
|
||||
|
|
Loading…
Add table
Reference in a new issue