fix modals

This commit is contained in:
Yuri Kuznetsov
2014-08-13 17:08:26 +03:00
parent 1652de16a7
commit a4e0c8107d
+20 -2
View File
@@ -108,14 +108,32 @@
}
}.bind(this));
}
this.$el.on('show.bs.modal', function (event) {
var idx = $('.modal:visible').length;
$(this).css('z-index', 1040 + (10 * idx));
});
this.$el.on('shown.bs.modal', function (event) {
var idx = ($('.modal:visible').length) - 1;
$('.modal-backdrop').not('.stacked').css('z-index', 1039 + (10 * idx));
$('.modal-backdrop').not('.stacked').addClass('stacked');
});
this.$el.on('hidden.bs.modal', function (event) {
if ($('.modal:visible').length > 0) {
setTimeout(function() {
$(document.body).addClass('modal-open');
}, 0);
}
});
}
Dialog.prototype.show = function () {
this.$el.modal({
backdrop: this.backdrop,
});
this.$el.css('z-index', 1200);
$('.modal-backdrop').css('z-index', 1100);
/*this.$el.css('z-index', 1200);
$('.modal-backdrop').css('z-index', 1100);*/
};
Dialog.prototype.close = function () {
this.$el.modal('hide');