Merge pull request #1428 from okriuchykhin/ok_SCI_2916

Fix ajax calls duplication [SCI-2916]
This commit is contained in:
Luka Murn 2018-12-18 09:14:22 +01:00 committed by GitHub
commit 5304fabed2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -255,11 +255,11 @@ var HelperModule = (function(){
// fix dropdown-menu style throughout the app
$('.dropdown-header').parent('ul').addClass('custom-dropdown-menu');
});
// Close all open modals before caching
$(document).on('turbolinks:before-cache', function() {
$('.modal').modal('hide');
});
// Close all open modals before caching
$(document).on('turbolinks:before-cache', function() {
$('.modal').off().modal('hide');
});
/* Fix .selectpicker (bootstrap-select) to work with Turbolinks 5.x */