summaryrefslogtreecommitdiffstats
path: root/core/js/jquery.ocdialog.js
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2015-05-06 11:00:23 +0200
committerMorris Jobke <hey@morrisjobke.de>2015-05-06 11:00:23 +0200
commite0640a0232236854e08a7b8bb57958229ae21f44 (patch)
treef5c0ad515c60d0f058bae122e4f2e8acc433e5aa /core/js/jquery.ocdialog.js
parentf1903f61a11c9e9c7a5b50af82883031cb1e95c1 (diff)
downloadnextcloud-server-e0640a0232236854e08a7b8bb57958229ae21f44.tar.gz
nextcloud-server-e0640a0232236854e08a7b8bb57958229ae21f44.zip
Resize filepicker on window size change
* add 20 px space to each direction -> 10px padding to left, right, top and bottom * fixes #16100
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);