Use modal body maximum height to compute treeview height
issue9551 review314171002
This commit is contained in:
+5
-1
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user