From 29c91de2fa3b0e581b8189179e239900c2323e82 Mon Sep 17 00:00:00 2001 From: Rolux Date: Sun, 21 Feb 2010 11:04:17 +0530 Subject: [PATCH] making dialog stay centered --- build/css/ox.ui.css | 5 +++++ build/js/ox.ui.js | 10 ++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/build/css/ox.ui.css b/build/css/ox.ui.css index cc2ff291..6a2ca515 100644 --- a/build/css/ox.ui.css +++ b/build/css/ox.ui.css @@ -61,6 +61,11 @@ Dialog .OxDialog { position: absolute; + left: 0; + top: -48px; + right: 0; + bottom: 0; + margin: auto; -moz-border-radius: 8px; -webkit-border-radius: 8px; } diff --git a/build/js/ox.ui.js b/build/js/ox.ui.js index a0cde86d..80cf213b 100644 --- a/build/js/ox.ui.js +++ b/build/js/ox.ui.js @@ -1252,8 +1252,8 @@ requires .options(options || {}) .addClass("OxDialog") .css({ - left: (($document.width() - self.options.width) / 2) + "px", - top: (($document.height() - self.options.height - 80) / 2) + "px", + //left: (($document.width() - self.options.width) / 2) + "px", + //top: (($document.height() - self.options.height - 80) / 2) + "px", width: self.options.width + "px", height: (self.options.height + 80) + "px" }); @@ -1316,6 +1316,9 @@ requires x = event.clientX, y = event.clientY; $window.mousemove(function(event) { + that.css({ + margin: 0 + }); $("*").css({ WebkitUserSelect: "none" }); @@ -1350,6 +1353,9 @@ requires x = event.clientX, y = event.clientY; $window.mousemove(function(event) { + that.css({ + margin: 0 + }); var width = Ox.limit( elementWidth - x + event.clientX, self.options.minWidth, documentWidth