summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2016-11-28 13:49:45 +0100
committerRobin Appelman <robin@icewind.nl>2016-11-28 13:49:45 +0100
commit7ac240f6f20688fc6d944c743986c389412dd1b7 (patch)
tree3e7a670472d71d4e3c3efc88b7c20263c31e3d57 /core
parent26af409a6e73b02a908ec2e799252ad3bd627f4d (diff)
downloadnextcloud-server-7ac240f6f20688fc6d944c743986c389412dd1b7.tar.gz
nextcloud-server-7ac240f6f20688fc6d944c743986c389412dd1b7.zip
fix dialog to window using css
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'core')
-rw-r--r--core/css/jquery.ocdialog.css5
-rw-r--r--core/js/jquery.ocdialog.js11
2 files changed, 4 insertions, 12 deletions
diff --git a/core/css/jquery.ocdialog.css b/core/css/jquery.ocdialog.css
index 7a7695a4e89..72253a6549c 100644
--- a/core/css/jquery.ocdialog.css
+++ b/core/css/jquery.ocdialog.css
@@ -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;
diff --git a/core/js/jquery.ocdialog.js b/core/js/jquery.ocdialog.js
index 1f02a372345..449c97ca01b 100644
--- a/core/js/jquery.ocdialog.js
+++ b/core/js/jquery.ocdialog.js
@@ -73,19 +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({
- 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() {