diff --git a/adminer/include/editing.inc.php b/adminer/include/editing.inc.php
index 967abd9f..88a8f1ff 100644
--- a/adminer/include/editing.inc.php
+++ b/adminer/include/editing.inc.php
@@ -182,7 +182,7 @@ function edit_fields($fields, $collations, $type = "TABLE", $allowed = 0, $forei
>" maxlength="255">
";
+ echo " | ";
echo " ";
echo " ";
echo " ";
diff --git a/adminer/static/editing.js b/adminer/static/editing.js
index 50df0099..445bf4d7 100644
--- a/adminer/static/editing.js
+++ b/adminer/static/editing.js
@@ -91,7 +91,7 @@ function editing_name_change(field) {
}
}
-function editing_add_row(button, allowed) {
+function editing_add_row(button, allowed, focus) {
if (allowed && row_count >= allowed) {
return false;
}
@@ -107,7 +107,7 @@ function editing_add_row(button, allowed) {
}
tags = row.getElementsByTagName('input');
tags2 = row2.getElementsByTagName('input');
- var ret = tags2[0]; // IE loose tags2 after insertBefore()
+ var input = tags2[0]; // IE loose tags2 after insertBefore()
for (var i=0; i < tags.length; i++) {
if (tags[i].name == 'auto_increment_col') {
tags2[i].value = x;
@@ -125,9 +125,15 @@ function editing_add_row(button, allowed) {
editing_name_change(tags[0]);
};
row.parentNode.insertBefore(row2, row.nextSibling);
+ if (focus) {
+ input.onchange = function () {
+ editing_name_change(input);
+ };
+ input.focus();
+ }
added += '0';
row_count++;
- return ret;
+ return true;
}
function editing_remove_row(button) {
|