Add editing row after writing first character
This commit is contained in:
parent
07db5e0bfb
commit
20285c4550
|
@ -244,7 +244,7 @@ function edit_fields($fields, $collations, $type = "TABLE", $foreign_keys = arra
|
||||||
?>
|
?>
|
||||||
<tr<?php echo ($display ? "" : " style='display: none;'"); ?>>
|
<tr<?php echo ($display ? "" : " style='display: none;'"); ?>>
|
||||||
<?php echo ($type == "PROCEDURE" ? "<td>" . html_select("fields[$i][inout]", explode("|", $inout), $field["inout"]) : ""); ?>
|
<?php echo ($type == "PROCEDURE" ? "<td>" . html_select("fields[$i][inout]", explode("|", $inout), $field["inout"]) : ""); ?>
|
||||||
<th><?php if ($display) { ?><input name="fields[<?php echo $i; ?>][field]" value="<?php echo h($field["field"]); ?>" onchange="editingNameChange(this);<?php echo ($field["field"] != "" || count($fields) > 1 ? '' : ' editingAddRow(this);" onkeypress="if (this.value) editingAddRow(this);'); ?>" maxlength="64" autocapitalize="off"><?php } ?>
|
<th><?php if ($display) { ?><input name="fields[<?php echo $i; ?>][field]" value="<?php echo h($field["field"]); ?>" onchange="editingNameChange(this);<?php echo ($field["field"] != "" || count($fields) > 1 ? '' : ' editingAddRow(this);" onkeyup="if (this.value) editingAddRow(this);'); ?>" maxlength="64" autocapitalize="off"><?php } ?>
|
||||||
<input type="hidden" name="fields[<?php echo $i; ?>][orig]" value="<?php echo h($orig); ?>">
|
<input type="hidden" name="fields[<?php echo $i; ?>][orig]" value="<?php echo h($orig); ?>">
|
||||||
<?php edit_type("fields[$i]", $field, $collations, $foreign_keys); ?>
|
<?php edit_type("fields[$i]", $field, $collations, $foreign_keys); ?>
|
||||||
<?php if ($type == "TABLE") { ?>
|
<?php if ($type == "TABLE") { ?>
|
||||||
|
|
|
@ -317,14 +317,14 @@ function editingAddRow(button, focus) {
|
||||||
tags[0].onchange = function () {
|
tags[0].onchange = function () {
|
||||||
editingNameChange(tags[0]);
|
editingNameChange(tags[0]);
|
||||||
};
|
};
|
||||||
tags[0].onkeypress = function () {
|
tags[0].onkeyup = function () {
|
||||||
};
|
};
|
||||||
row.parentNode.insertBefore(row2, row.nextSibling);
|
row.parentNode.insertBefore(row2, row.nextSibling);
|
||||||
if (focus) {
|
if (focus) {
|
||||||
input.onchange = function () {
|
input.onchange = function () {
|
||||||
editingNameChange(input);
|
editingNameChange(input);
|
||||||
};
|
};
|
||||||
input.onkeypress = function () {
|
input.onkeyup = function () {
|
||||||
};
|
};
|
||||||
input.focus();
|
input.focus();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue