aboutsummaryrefslogtreecommitdiffstats
path: root/core/js/jquery.ocdialog.js
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2014-05-19 21:42:30 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2014-05-19 21:42:30 +0200
commit30f1ec2521f1983f744c4efdaaed5fe97b6e958d (patch)
treeb20cd3848e4e27bc2260fd66f3896b9bfbf6cc54 /core/js/jquery.ocdialog.js
parentb7981910f7a4bf8815c23714d525633a8c800f18 (diff)
parentb6d2d6329d99c47fa8a01a7a8db7f8f2de6b9f74 (diff)
downloadnextcloud-server-30f1ec2521f1983f744c4efdaaed5fe97b6e958d.tar.gz
nextcloud-server-30f1ec2521f1983f744c4efdaaed5fe97b6e958d.zip
Merge branch 'master' into test_annotations_working
Conflicts: lib/private/util.php
Diffstat (limited to 'core/js/jquery.ocdialog.js')
-rw-r--r--core/js/jquery.ocdialog.js18
1 files changed, 12 insertions, 6 deletions
diff --git a/core/js/jquery.ocdialog.js b/core/js/jquery.ocdialog.js
index 02cd6ac1466..e2433f5f980 100644
--- a/core/js/jquery.ocdialog.js
+++ b/core/js/jquery.ocdialog.js
@@ -67,8 +67,8 @@
self.parent = self.$dialog.parent().length > 0 ? self.$dialog.parent() : $('body');
var pos = self.parent.position();
self.$dialog.css({
- left: pos.left + (self.parent.width() - self.$dialog.outerWidth())/2,
- top: pos.top + (self.parent.height() - self.$dialog.outerHeight())/2
+ left: pos.left + ($(window).innerWidth() - self.$dialog.outerWidth())/2,
+ top: pos.top + ($(window).innerHeight() - self.$dialog.outerHeight())/2
});
});
@@ -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) {