From e0640a0232236854e08a7b8bb57958229ae21f44 Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Wed, 6 May 2015 11:00:23 +0200 Subject: [PATCH 1/2] Resize filepicker on window size change * add 20 px space to each direction -> 10px padding to left, right, top and bottom * fixes #16100 --- core/js/jquery.ocdialog.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/js/jquery.ocdialog.js b/core/js/jquery.ocdialog.js index e48e3e8df6..ea034f0aff 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); From de04501c9720a81759c66162e01d351aa82132b8 Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Wed, 6 May 2015 11:15:48 +0200 Subject: [PATCH 2/2] add max-width of 600px to filepicker --- core/js/oc-dialogs.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/js/oc-dialogs.js b/core/js/oc-dialogs.js index afd7debb69..0692a9df5c 100644 --- a/core/js/oc-dialogs.js +++ b/core/js/oc-dialogs.js @@ -207,7 +207,8 @@ var OCdialogs = { self.$filePicker.ocdialog({ closeOnEscape: true, - width: (4/5)*$(document).width(), + // max-width of 600 + width: Math.min((4/5)*$(document).width(), 600), height: 420, modal: modal, buttons: buttonlist,