diff --git a/data/interfaces/default/base.html b/data/interfaces/default/base.html index 3d790374..d6e42b73 100644 --- a/data/interfaces/default/base.html +++ b/data/interfaces/default/base.html @@ -395,6 +395,18 @@ ${next.headerIncludes()} } }); } + + // Allow stacked bootstrap modals + $(document).on('show.bs.modal', '.modal', function (event) { + var zIndex = 1040 + (10 * $('.modal:visible').length); + $(this).css('z-index', zIndex); + setTimeout(function() { + $('.modal-backdrop').not('.modal-stack').css('z-index', zIndex - 1).addClass('modal-stack'); + }, 0); + }); + $(document).on('hidden.bs.modal', '.modal', function () { + $('.modal:visible').length && $(document.body).addClass('modal-open'); + }); }); % if _session['user_group'] != 'admin':