diff options
author | Robin Appelman <icewind@owncloud.com> | 2014-05-13 12:58:02 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2014-05-13 13:00:46 +0200 |
commit | c85e6d919eb333900225b8f107e03843c0f85e36 (patch) | |
tree | 1cd733c9161579786dcf7afbb799273acfa27f95 | |
parent | 46d6cb739d1f43482a1a512b0a86782a2ae9d8d6 (diff) | |
download | nextcloud-server-c85e6d919eb333900225b8f107e03843c0f85e36.tar.gz nextcloud-server-c85e6d919eb333900225b8f107e03843c0f85e36.zip |
Use jquery to get the window width
-rw-r--r-- | core/js/jquery.ocdialog.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/js/jquery.ocdialog.js b/core/js/jquery.ocdialog.js index 66d9b12db30..e2433f5f980 100644 --- a/core/js/jquery.ocdialog.js +++ b/core/js/jquery.ocdialog.js @@ -67,8 +67,8 @@ 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 + left: pos.left + ($(window).innerWidth() - self.$dialog.outerWidth())/2, + top: pos.top + ($(window).innerHeight() - self.$dialog.outerHeight())/2 }); }); |