Merge pull request #16104 from owncloud/resize-filepicker

Resize filepicker on window size change
This commit is contained in:
Jan-Christoph Borchardt 2015-05-12 15:57:23 +02:00
commit 21a1995ad6
2 changed files with 7 additions and 2 deletions

View file

@ -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);

View file

@ -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,