diff options
Diffstat (limited to 'core/js')
-rw-r--r-- | core/js/jquery.ocdialog.js | 34 | ||||
-rw-r--r-- | core/js/oc-dialogs.js | 11 |
2 files changed, 8 insertions, 37 deletions
diff --git a/core/js/jquery.ocdialog.js b/core/js/jquery.ocdialog.js index 66c7d9bd7f1..b54cce2c0ca 100644 --- a/core/js/jquery.ocdialog.js +++ b/core/js/jquery.ocdialog.js @@ -73,21 +73,8 @@ return false; } }); - $(window).resize(function() { - self.parent = self.$dialog.parent().length > 0 ? self.$dialog.parent() : $('body'); - 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, - 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); - $(window).trigger('resize'); this._createOverlay(); }, _init: function() { @@ -172,25 +159,16 @@ $.Widget.prototype._setOptions.apply(this, arguments); }, _setSizes: function() { - var content_height = this.$dialog.height(); + var lessHeight = 0; if(this.$title) { - content_height -= this.$title.outerHeight(true); + lessHeight += this.$title.outerHeight(true); } if(this.$buttonrow) { - content_height -= this.$buttonrow.outerHeight(true); - } - this.parent = this.$dialog.parent().length > 0 ? this.$dialog.parent() : $('body'); - content_height = Math.min(content_height, this.parent.height()-20); - if (content_height> 0) { - this.element.css({ - height: content_height + 'px', - width: this.$dialog.innerWidth() - 30 + 'px' - }); - } else { - this.element.css({ - width : this.$dialog.innerWidth() - 30 + 'px' - }); + lessHeight += this.$buttonrow.outerHeight(true); } + this.element.css({ + 'height': 'calc(100% - ' + lessHeight + 'px)' + }); }, _createOverlay: function() { if(!this.options.modal) { diff --git a/core/js/oc-dialogs.js b/core/js/oc-dialogs.js index f811322b099..7476c93ba45 100644 --- a/core/js/oc-dialogs.js +++ b/core/js/oc-dialogs.js @@ -232,8 +232,8 @@ var OCdialogs = { self.$filePicker.ocdialog({ closeOnEscape: true, // max-width of 600 - width: Math.min((4/5)*$(document).width(), 600), - height: 420, + width: 600, + height: 500, modal: modal, buttons: buttonlist, close: function() { @@ -253,10 +253,6 @@ var OCdialogs = { } else { buttonEnableDisable.prop("disabled", true); } - - if (!OC.Util.hasSVGSupport()) { - OC.Util.replaceSVG(self.$filePicker.parent()); - } }) .fail(function(status, error) { // If the method is called while navigating away @@ -835,9 +831,6 @@ var OCdialogs = { }); self.$filelist.removeClass('icon-loading'); - if (!OC.Util.hasSVGSupport()) { - OC.Util.replaceSVG(self.$filePicker.find('.dirtree')); - } }); }, /** |