From: jakubvrana Date: Tue, 9 Feb 2010 12:11:35 +0000 (+0000) Subject: Schema in Chrome (bug #2947938) X-Git-Tag: v3.0.0~247 X-Git-Url: https://git.joonet.de/?a=commitdiff_plain;h=34f3d0cd32e099f53755c615f5364b1b3c447560;p=adminer.git Schema in Chrome (bug #2947938) git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1304 7c3ca157-0c34-0410-bff1-cbf682f78f5c --- diff --git a/adminer/schema.inc.php b/adminer/schema.inc.php index f1c34e63..00252bfd 100644 --- a/adminer/schema.inc.php +++ b/adminer/schema.inc.php @@ -31,8 +31,8 @@ foreach (table_status() as $row) { foreach (foreign_keys($row["Name"]) as $val) { if (!$val["db"]) { $left = $base_left; - if ($table_pos[$row["Name"]][1] || $table_pos[$row["Name"]][1]) { - $left = min($table_pos[$row["Name"]][1], $table_pos[$val["table"]][1]) - 1; + if ($table_pos[$row["Name"]][1] || $table_pos[$val["table"]][1]) { + $left = min(floatval($table_pos[$row["Name"]][1]), floatval($table_pos[$val["table"]][1])) - 1; } else { $base_left -= .1; } diff --git a/adminer/static/editing.js b/adminer/static/editing.js index 1b85ffda..75fc26ab 100644 --- a/adminer/static/editing.js +++ b/adminer/static/editing.js @@ -394,6 +394,6 @@ function schemaMouseup(ev) { for (var key in tablePos) { s += '_' + key + ':' + Math.round(tablePos[key][0] * 10000) / 10000 + 'x' + Math.round(tablePos[key][1] * 10000) / 10000; } - document.cookie = 'adminer_schema=' + encodeURIComponent(s.substr(1)) + '; expires=' + date + '; path=' + location.pathname + location.search; + document.cookie = 'adminer_schema=' + encodeURIComponent(s.substr(1)) + '; expires=' + date + '; path="' + location.pathname + location.search + '"'; } }