]> source.dussan.org Git - nextcloud-server.git/commitdiff
move more sizing logic to css 2342/head
authorRobin Appelman <robin@icewind.nl>
Mon, 28 Nov 2016 13:05:46 +0000 (14:05 +0100)
committerRobin Appelman <robin@icewind.nl>
Mon, 28 Nov 2016 13:05:46 +0000 (14:05 +0100)
Signed-off-by: Robin Appelman <robin@icewind.nl>
core/css/jquery.ocdialog.css
core/css/styles.css
core/js/jquery.ocdialog.js
core/js/oc-dialogs.js

index 72253a6549c9b620f8cdec38a4f630ec09b3ff32..487bc1c4f690a6384be9bcf218e70aa4e0343410 100644 (file)
@@ -26,8 +26,8 @@
        background: transparent;
        right: 0;
        bottom: 0;
-       padding: 20px;
-       padding-bottom: 10px;
+       padding: 10px;
+       padding-bottom: 0;
        box-sizing: border-box;
        width: 100%;
        background-image: linear-gradient(rgba(255, 255, 255, 0), rgba(255, 255, 255, 1));
@@ -70,3 +70,7 @@
        top: 0; left: 0;
        width: 100%; height: 100%;
 }
+
+.oc-dialog-content {
+       width: 100%;
+}
index 14bb75de87929cb25f25b335da32846d04f4c01b..5a5432cbf16ededee83788f7715af198b384a1df 100644 (file)
@@ -773,7 +773,7 @@ a.bookmarklet { background-color:#ddd; border:1px solid #ccc; padding:5px;paddin
        box-sizing: border-box;
        display: inline-block;
        overflow-y: auto;
-       height: calc(100% + 20px); /** overflow under the button row */
+       height: 100%; /** overflow under the button row */
        width: 100%;
        padding-bottom: 55px;
 }
index 449c97ca01b58989064d9805e70579ab8d91f4c5..b54cce2c0ca3859ed7cb9b32a7f0b3fad4d3069b 100644 (file)
                        $.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');
-                       if (this.parent.height() > 0) {
-                               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) {
index 26f06cfbb273cdabf47b156996e292b221f12302..a9547b1adc52150edde58e93f5c49d3550bbcc4f 100644 (file)
@@ -232,8 +232,8 @@ var OCdialogs = {
                        self.$filePicker.ocdialog({
                                closeOnEscape: true,
                                // max-width of 600
-                               width: Math.min((4/5)*$(document).width(), 600),
-                               height: Math.min((4 / 5) * $(document).height(), 500),
+                               width: 600,
+                               height: 500,
                                modal: modal,
                                buttons: buttonlist,
                                close: function() {