making dialog stay centered

This commit is contained in:
Rolux 2010-02-21 11:04:17 +05:30
parent b6c01e27ea
commit 541fdb6dc9
2 changed files with 13 additions and 2 deletions

View File

@ -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;
}

View File

@ -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