From f4d79485d72354c4f0c88d5291c04ad1cbc0de0c Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Fri, 25 Nov 2016 20:49:50 +0100 Subject: [PATCH] fix styling of filepicker dialog Signed-off-by: Robin Appelman --- core/css/jquery.ocdialog.css | 17 +++++++++++------ core/css/styles.css | 2 +- core/js/jquery.ocdialog.js | 4 +++- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/core/css/jquery.ocdialog.css b/core/css/jquery.ocdialog.css index d1a42694589..939c44f4d4e 100644 --- a/core/css/jquery.ocdialog.css +++ b/core/css/jquery.ocdialog.css @@ -14,17 +14,14 @@ background: #fff; margin-left: 12px; } -.oc-dialog-content { - z-index: 1000; -} -.oc-dialog-separator { -} .oc-dialog-buttonrow { + position: relative; display: block; background: transparent; right: 0; bottom: 0; - padding: 10px; + padding: 20px; + padding-bottom: 10px; box-sizing: border-box; width: 100%; background-image: linear-gradient(rgba(255, 255, 255, 0), rgba(255, 255, 255, 1)); @@ -42,6 +39,14 @@ .oc-dialog-buttonrow.onebutton button { float: right; } +.oc-dialog-buttonrow:after { + visibility: hidden; + display: block; + font-size: 0; + content: " "; + clear: both; + height: 0; +} .oc-dialog-close { position: absolute; diff --git a/core/css/styles.css b/core/css/styles.css index 21583d6198c..14bb75de879 100644 --- a/core/css/styles.css +++ b/core/css/styles.css @@ -773,7 +773,7 @@ a.bookmarklet { background-color:#ddd; border:1px solid #ccc; padding:5px;paddin box-sizing: border-box; display: inline-block; overflow-y: auto; - height: 321px; + height: calc(100% + 20px); /** overflow under the button row */ width: 100%; padding-bottom: 55px; } diff --git a/core/js/jquery.ocdialog.js b/core/js/jquery.ocdialog.js index 66c7d9bd7f1..9d1d58bdf64 100644 --- a/core/js/jquery.ocdialog.js +++ b/core/js/jquery.ocdialog.js @@ -180,7 +180,9 @@ content_height -= this.$buttonrow.outerHeight(true); } this.parent = this.$dialog.parent().length > 0 ? this.$dialog.parent() : $('body'); - content_height = Math.min(content_height, this.parent.height()-20); + if (this.parent.height() > 0) { + content_height = Math.min(content_height, this.parent.height() - 20); + } if (content_height> 0) { this.element.css({ height: content_height + 'px', -- 2.39.5