diff options
author | Robin Appelman <icewind@owncloud.com> | 2014-05-13 11:37:29 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2014-05-13 11:37:29 +0200 |
commit | 46d6cb739d1f43482a1a512b0a86782a2ae9d8d6 (patch) | |
tree | 19c6b9c46db106de957c2b7cc8c156b2c7a88718 /core/js/jquery.ocdialog.js | |
parent | 541495b1b5910935150f75d6208a25728520fd93 (diff) | |
download | nextcloud-server-46d6cb739d1f43482a1a512b0a86782a2ae9d8d6.tar.gz nextcloud-server-46d6cb739d1f43482a1a512b0a86782a2ae9d8d6.zip |
Don't set the dialog content height to a zero or negative value
Diffstat (limited to 'core/js/jquery.ocdialog.js')
-rw-r--r-- | core/js/jquery.ocdialog.js | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/core/js/jquery.ocdialog.js b/core/js/jquery.ocdialog.js index b91f3ed7654..66d9b12db30 100644 --- a/core/js/jquery.ocdialog.js +++ b/core/js/jquery.ocdialog.js @@ -160,10 +160,16 @@ } this.parent = this.$dialog.parent().length > 0 ? this.$dialog.parent() : $('body'); content_height = Math.min(content_height, this.parent.height()-20); - this.element.css({ - height: content_height + 'px', - width: this.$dialog.innerWidth()-20 + 'px' - }); + if (content_height> 0) { + this.element.css({ + height: content_height + 'px', + width: this.$dialog.innerWidth()-20 + 'px' + }); + } else { + this.element.css({ + width : this.$dialog.innerWidth() - 20 + 'px' + }); + } }, _createOverlay: function() { if(!this.options.modal) { |