]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix dialog to window using css
authorRobin Appelman <robin@icewind.nl>
Mon, 28 Nov 2016 12:49:45 +0000 (13:49 +0100)
committerRobin Appelman <robin@icewind.nl>
Mon, 28 Nov 2016 12:49:45 +0000 (13:49 +0100)
Signed-off-by: Robin Appelman <robin@icewind.nl>
core/css/jquery.ocdialog.css
core/js/jquery.ocdialog.js

index 7a7695a4e8924f780bda61e34aa0df9799bf13aa..72253a6549c9b620f8cdec38a4f630ec09b3ff32 100644 (file)
@@ -3,7 +3,7 @@
        color: #333;
        border-radius: 3px; box-shadow: 0 0 7px #888;
        padding: 15px;
-       z-index: 1000;
+       z-index: 10000;
        font-size: 100%;
        -webkit-box-sizing: border-box;
        -moz-box-sizing: border-box;
@@ -12,6 +12,9 @@
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
+       max-height: calc(100% - 20px);
+       max-width: calc(100% - 20px);
+       overflow: auto;
 }
 .oc-dialog-title {
        background: #fff;
index 1f02a372345be7e1aceaebae70338b5b13912e77..449c97ca01b58989064d9805e70579ab8d91f4c5 100644 (file)
                                        return false;
                                }
                        });
-                       $(window).resize(function() {
-                               self.parent = self.$dialog.parent().length > 0 ? self.$dialog.parent() : $('body');
-                               var pos = self.parent.position();
-                               self.$dialog.css({
-                                       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() {