Выравниваем алерты, промпты и диалоги
Bootbox.js по вертикали если указан класс v-center
bootbox.alert({message: "Прежде необходимо утвердить реестр по всем предприятиям!", className: 'v-center'});
bootbox.alert("Прежде необходимо утвердить реестр по всем предприятиям!");
$(function() {
$(window).on('show.bs.modal resize', function(e){
var setVpos = function() {
$(this).find('.modal-dialog').css("margin-top", function() { return Math.max(0, ($(window).height() - $(this).height()) / 3) } );
};
if ($.isWindow(e.target))
$('.modal.v-center:visible').each(setVpos);
else if ($(e.target).hasClass('v-center'))
$(e.target).each(setVpos);
})
});