]> source.dussan.org Git - nextcloud-server.git/commitdiff
Don't set the dialog content height to a zero or negative value
authorRobin Appelman <icewind@owncloud.com>
Tue, 13 May 2014 09:37:29 +0000 (11:37 +0200)
committerRobin Appelman <icewind@owncloud.com>
Tue, 13 May 2014 09:37:29 +0000 (11:37 +0200)
core/js/jquery.ocdialog.js

index b91f3ed7654e9ea08f0a9293f87dd4e2ee5db567..66d9b12db30558032ed5a9e9da1c1d4890d42a6b 100644 (file)
                        }
                        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) {