diff options
author | Robin Appelman <robin@icewind.nl> | 2016-11-28 14:05:46 +0100 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2016-11-28 14:05:46 +0100 |
commit | b2b9abfa33f75f779e62f8f2554e2159b3bca90d (patch) | |
tree | 66220f0870af86cda1fd147424813d482355d5eb /core | |
parent | 7ac240f6f20688fc6d944c743986c389412dd1b7 (diff) | |
download | nextcloud-server-b2b9abfa33f75f779e62f8f2554e2159b3bca90d.tar.gz nextcloud-server-b2b9abfa33f75f779e62f8f2554e2159b3bca90d.zip |
move more sizing logic to css
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'core')
-rw-r--r-- | core/css/jquery.ocdialog.css | 8 | ||||
-rw-r--r-- | core/css/styles.css | 2 | ||||
-rw-r--r-- | core/js/jquery.ocdialog.js | 23 | ||||
-rw-r--r-- | core/js/oc-dialogs.js | 4 |
4 files changed, 15 insertions, 22 deletions
diff --git a/core/css/jquery.ocdialog.css b/core/css/jquery.ocdialog.css index 72253a6549c..487bc1c4f69 100644 --- a/core/css/jquery.ocdialog.css +++ b/core/css/jquery.ocdialog.css @@ -26,8 +26,8 @@ background: transparent; right: 0; bottom: 0; - padding: 20px; - padding-bottom: 10px; + padding: 10px; + padding-bottom: 0; box-sizing: border-box; width: 100%; background-image: linear-gradient(rgba(255, 255, 255, 0), rgba(255, 255, 255, 1)); @@ -70,3 +70,7 @@ top: 0; left: 0; width: 100%; height: 100%; } + +.oc-dialog-content { + width: 100%; +} diff --git a/core/css/styles.css b/core/css/styles.css index 14bb75de879..5a5432cbf16 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: calc(100% + 20px); /** overflow under the button row */ + height: 100%; /** 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 449c97ca01b..b54cce2c0ca 100644 --- a/core/js/jquery.ocdialog.js +++ b/core/js/jquery.ocdialog.js @@ -159,27 +159,16 @@ $.Widget.prototype._setOptions.apply(this, arguments); }, _setSizes: function() { - var content_height = this.$dialog.height(); + var lessHeight = 0; if(this.$title) { - content_height -= this.$title.outerHeight(true); + lessHeight += this.$title.outerHeight(true); } if(this.$buttonrow) { - content_height -= this.$buttonrow.outerHeight(true); - } - this.parent = this.$dialog.parent().length > 0 ? this.$dialog.parent() : $('body'); - 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', - width: this.$dialog.innerWidth() - 30 + 'px' - }); - } else { - this.element.css({ - width : this.$dialog.innerWidth() - 30 + 'px' - }); + lessHeight += this.$buttonrow.outerHeight(true); } + this.element.css({ + 'height': 'calc(100% - ' + lessHeight + 'px)' + }); }, _createOverlay: function() { if(!this.options.modal) { diff --git a/core/js/oc-dialogs.js b/core/js/oc-dialogs.js index 26f06cfbb27..a9547b1adc5 100644 --- a/core/js/oc-dialogs.js +++ b/core/js/oc-dialogs.js @@ -232,8 +232,8 @@ var OCdialogs = { self.$filePicker.ocdialog({ closeOnEscape: true, // max-width of 600 - width: Math.min((4/5)*$(document).width(), 600), - height: Math.min((4 / 5) * $(document).height(), 500), + width: 600, + height: 500, modal: modal, buttons: buttonlist, close: function() { |