]> source.dussan.org Git - nextcloud-server.git/commitdiff
Use jquery to get the window width
authorRobin Appelman <icewind@owncloud.com>
Tue, 13 May 2014 10:58:02 +0000 (12:58 +0200)
committerRobin Appelman <icewind@owncloud.com>
Tue, 13 May 2014 11:00:46 +0000 (13:00 +0200)
core/js/jquery.ocdialog.js

index 66d9b12db30558032ed5a9e9da1c1d4890d42a6b..e2433f5f9804a41518f621379456ff346606df8f 100644 (file)
@@ -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
                                });
                        });