Use modal body maximum height to compute treeview height

issue9551
review314171002
This commit is contained in:
Cédric Krier
2020-09-12 18:28:22 +02:00
parent 92bc8835db
commit 2d3374b873
+5 -1
View File
@@ -19,6 +19,10 @@
var height = '';
if (!el.parents('.form').length &&
!el.parents('#menu').length) {
var vh = '100vh';
if (el.parents('.modal-body').length) {
vh = el.parents('.modal-body').css('max-height');
}
var padding = ' ';
el.parents('.panel-body').each(function(i, panel) {
panel = jQuery(panel);
@@ -37,7 +41,7 @@
}
});
var y = el[0].getBoundingClientRect().y;
height = 'calc(100vh - ' + y + 'px' + padding + box_shadow + ')';
height = 'calc(' + vh + ' - ' + y + 'px' + padding + box_shadow + ')';
}
el.css('height', height);
}