aboutsummaryrefslogtreecommitdiffstats
path: root/core/js/jquery.ocdialog.js
diff options
context:
space:
mode:
authorJan-Christoph Borchardt <hey@jancborchardt.net>2015-05-12 15:57:23 +0200
committerJan-Christoph Borchardt <hey@jancborchardt.net>2015-05-12 15:57:23 +0200
commit21a1995ad66cda2712786a1cc47227452b1d84ab (patch)
tree5360a3f7c54beaa194f123fde554eb28c4652f6f /core/js/jquery.ocdialog.js
parent44091a1a123c0fec27697acab0ee68bd8d61efc3 (diff)
parentde04501c9720a81759c66162e01d351aa82132b8 (diff)
downloadnextcloud-server-21a1995ad66cda2712786a1cc47227452b1d84ab.tar.gz
nextcloud-server-21a1995ad66cda2712786a1cc47227452b1d84ab.zip
Merge pull request #16104 from owncloud/resize-filepicker
Resize filepicker on window size change
Diffstat (limited to 'core/js/jquery.ocdialog.js')
-rw-r--r--core/js/jquery.ocdialog.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/core/js/jquery.ocdialog.js b/core/js/jquery.ocdialog.js
index e48e3e8df6a..ea034f0aff7 100644
--- a/core/js/jquery.ocdialog.js
+++ b/core/js/jquery.ocdialog.js
@@ -78,8 +78,12 @@
var pos = self.parent.position();
self.$dialog.css({
left: pos.left + ($(window).innerWidth() - self.$dialog.outerWidth())/2,
- top: pos.top + ($(window).innerHeight() - self.$dialog.outerHeight())/2
+ top: pos.top + ($(window).innerHeight() - self.$dialog.outerHeight())/2,
+ width: Math.min(self.options.width, $(window).innerWidth() - 20 ),
+ height: Math.min(self.options.height, $(window).innerHeight() - 20)
});
+ // set sizes of content
+ self._setSizes();
});
this._setOptions(this.options);