From b3173386ae1b5efdd13a4786bfdf7aaa9d6a510e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Fri, 3 May 2019 16:44:38 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20modals:=20re-add=20missing=20min?= =?UTF-8?q?Height=20support?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../static/js/lib/bootstrap/bootstrap-modal.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/octoprint/static/js/lib/bootstrap/bootstrap-modal.js b/src/octoprint/static/js/lib/bootstrap/bootstrap-modal.js index 1911f2a69..034de6729 100644 --- a/src/octoprint/static/js/lib/bootstrap/bootstrap-modal.js +++ b/src/octoprint/static/js/lib/bootstrap/bootstrap-modal.js @@ -107,7 +107,8 @@ layout: function () { var prop = this.options.height ? 'height' : 'max-height', - value = this.options.height || this.options.maxHeight; + value = this.options.height || this.options.maxHeight, + minHeight = this.options.minHeight; if (this.options.width){ this.$element.css('width', this.options.width); @@ -127,7 +128,8 @@ this.$element.find('.modal-body') .css('overflow', '') - .css(prop, ''); + .css(prop, '') + .css('min-height', ''); if (value){ this.$element.find('.modal-body') @@ -135,6 +137,11 @@ .css(prop, value); } + if (minHeight) { + this.$element.find('.modal-body') + .css('min-height', minHeight); + } + var modalOverflow = $(window).height() - 10 < this.$element.height(); if (modalOverflow || this.options.modalOverflow) { @@ -342,6 +349,7 @@ width: null, height: null, maxHeight: null, + minHeight: null, modalOverflow: false, consumeTab: true, focusOn: null,