Fix for stacked modals

This commit is contained in:
JonnyWong16 2017-02-02 20:37:34 -08:00
parent 876ff65694
commit de6215a933

View file

@ -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':