diff --git a/editing.inc.php b/editing.inc.php
index df06613a..f9368b17 100644
--- a/editing.inc.php
+++ b/editing.inc.php
@@ -124,12 +124,7 @@ function edit_fields($fields, $collations, $type = "TABLE", $allowed = 0) {
|
> |
-
-
- |
+ |
$field) {
diff --git a/functions.js b/functions.js
index bb3c242c..d82f24f6 100644
--- a/functions.js
+++ b/functions.js
@@ -1,3 +1,5 @@
+document.body.className = 'js';
+
function toggle(id) {
var el = document.getElementById(id);
el.className = (el.className == 'hidden' ? '' : 'hidden');
@@ -20,6 +22,8 @@ function tables_check(el) {
}
}
+
+
function where_change(op) {
for (var i=0; i < op.form.elements.length; i++) {
var el = op.form.elements[i];
@@ -46,11 +50,15 @@ function select_add_row(field) {
field.onchange = function () { };
}
+
+
+var added = '.', row_count;
+
function editing_add_row(button, allowed) {
if (allowed && row_count >= allowed) {
return false;
}
- var match = /([0-9]+)(\.[0-9]+)?/.exec(button.name)
+ var match = /([0-9]+)(\.[0-9]+)?/.exec(button.name);
var x = match[0] + (match[2] ? added.substr(match[2].length) : added) + '1';
var row = button.parentNode.parentNode;
var row2 = row.cloneNode(true);
@@ -119,6 +127,8 @@ function partition_name_change(el) {
el.onchange = function () {};
}
+
+
function foreign_add_row(field) {
var row = field.parentNode.parentNode.cloneNode(true);
var selects = row.getElementsByTagName('select');
@@ -130,6 +140,8 @@ function foreign_add_row(field) {
field.onchange = function () { };
}
+
+
function indexes_add_row(field) {
var row = field.parentNode.parentNode.cloneNode(true);
var spans = row.getElementsByTagName('span');
@@ -158,9 +170,12 @@ function indexes_add_column(field) {
field.onchange = function () { };
}
-function schema_mousedown(el, event, top) {
+
+
+var that, x, y, em, table_pos;
+
+function schema_mousedown(el, event) {
that = el;
- em = document.getElementById('schema').offsetHeight / top;
x = event.clientX - el.offsetLeft;
y = event.clientY - el.offsetTop;
}
@@ -223,6 +238,8 @@ function schema_mouseup(ev) {
}
}
+
+
function dump_check(a, name, value) {
var inputs = a.parentNode.parentNode.parentNode.parentNode.getElementsByTagName('input');
for (var i=0; i < inputs.length; i++) {
@@ -232,5 +249,3 @@ function dump_check(a, name, value) {
}
return true;
}
-
-document.body.className = 'js';
diff --git a/schema.inc.php b/schema.inc.php
index 44e97bc0..0d78224e 100644
--- a/schema.inc.php
+++ b/schema.inc.php
@@ -50,17 +50,16 @@ while ($row = $result->fetch_assoc()) {
$result->free();
?>
+