modal fixes

This commit is contained in:
yuri
2017-01-20 15:46:07 +02:00
parent 61c1732b9c
commit 76551a59fe
2 changed files with 7 additions and 1 deletions
+6 -1
View File
@@ -139,6 +139,11 @@ Espo.define('ui', [], function () {
this.$el.on('shown.bs.modal', function (e) {
$('.modal-backdrop').not('.stacked').addClass('stacked');
var headerHeight = this.$el.find('header.modal-header').outerHeight();
var footerHeight = this.$el.find('footer.modal-footer').outerHeight();
var diffHeight = headerHeight + footerHeight + options.modalBodyDiffHeight;
if (this.fitHeight) {
var processResize = function () {
var windowHeight = $window.height();
@@ -150,7 +155,7 @@ Espo.define('ui', [], function () {
return;
}
this.$el.find('div.modal-body').css({
'maxHeight': (windowHeight - 192) + 'px',
'maxHeight': (windowHeight - diffHeight) + 'px',
'overflow': 'auto'
});
}.bind(this);
+1
View File
@@ -142,6 +142,7 @@ Espo.define('views/modal', 'view', function (Dep) {
fitHeight: this.fitHeight,
draggable: this.isDraggable,
className: this.className,
modalBodyDiffHeight: this.getThemeManager().getParam('modalBodyDiffHeight') || 92,
onRemove: function () {
this.onDialogClose();
}.bind(this)