$structured_types[lang('Foreign keys')] = $foreign_keys;
}
echo optionlist(array_merge($extra_types, $structured_types), $type);
-?></select><?php echo on_help("getTarget(event).value", 1); ?>
-<?php echo script("mixin(qsl('select'), {onfocus: function () { lastType = selectValue(this); }, onchange: editingTypeChange});", ""); ?>
-<td><input name="<?php echo h($key); ?>[length]" value="<?php echo h($field["length"]); ?>" size="3"<?php echo (!$field["length"] && preg_match('~var(char|binary)$~', $type) ? " class='required'" : ""); //! type="number" with enabled JavaScript ?> aria-labelledby="label-length"><?php echo script("mixin(qsl('input'), {onfocus: editingLengthFocus, oninput: editingLengthChange});", ""); ?><td class="options"><?php
+?></select><td><input name="<?php echo h($key); ?>[length]" value="<?php echo h($field["length"]); ?>" size="3"<?php echo (!$field["length"] && preg_match('~var(char|binary)$~', $type) ? " class='required'" : ""); //! type="number" with enabled JavaScript ?> aria-labelledby="label-length"><td class="options"><?php
echo "<select name='" . h($key) . "[collation]'" . (preg_match('~(char|text|enum|set)$~', $type) ? "" : " class='hidden'") . '><option value="">(' . lang('collation') . ')' . optionlist($collations, $field["collation"]) . '</select>';
echo ($unsigned ? "<select name='" . h($key) . "[unsigned]'" . (!$type || preg_match(number_type(), $type) ? "" : " class='hidden'") . '><option>' . optionlist($unsigned, $field["unsigned"]) . '</select>' : '');
echo (isset($field['on_update']) ? "<select name='" . h($key) . "[on_update]'" . (preg_match('~timestamp|datetime~', $type) ? "" : " class='hidden'") . '>' . optionlist(array("" => "(" . lang('ON UPDATE') . ")", "CURRENT_TIMESTAMP"), (preg_match('~^CURRENT_TIMESTAMP~i', $field["on_update"]) ? "CURRENT_TIMESTAMP" : $field["on_update"])) . '</select>' : '');
?>
<tr<?php echo ($display ? "" : " style='display: none;'"); ?>>
<?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"]); ?>" data-maxlength="64" autocapitalize="off" aria-labelledby="label-name"><?php echo script("qsl('input').oninput = function () { editingNameChange.call(this);" . ($field["field"] != "" || count($fields) > 1 ? "" : " editingAddRow.call(this);") . " };", ""); ?><?php } ?>
+<th><?php if ($display) { ?><input name="fields[<?php echo $i; ?>][field]" value="<?php echo h($field["field"]); ?>" data-maxlength="64" autocapitalize="off" aria-labelledby="label-name"><?php } ?>
<input type="hidden" name="fields[<?php echo $i; ?>][orig]" value="<?php echo h($orig); ?>"><?php edit_type("fields[$i]", $field, $collations, $foreign_keys); ?>
<?php if ($type == "TABLE") { ?>
<td><?php echo checkbox("fields[$i][null]", 1, $field["null"], "", "", "block", "label-null"); ?>
+/** Set up event handlers for edit_fields().
+*/
+function editFields() {
+ var els = qsa('[name$="[field]"]');
+ for (var i = 0; i < els.length; i++) {
+ els[i].oninput = function () {
+ editingNameChange.call(this);
+ if (!this.defaultValue) {
+ editingAddRow.call(this);
+ }
+ }
+ }
+ els = qsa('[name$="[length]"]');
+ for (var i = 0; i < els.length; i++) {
+ mixin(els[i], {onfocus: editingLengthFocus, oninput: editingLengthChange});
+ }
+ els = qsa('[name$="[type]"]');
+ for (var i = 0; i < els.length; i++) {
+ mixin(els[i], {
+ onfocus: function () { lastType = selectValue(this); },
+ onchange: editingTypeChange,
+ onmouseover: function (event) { helpMouseover.call(this, event, getTarget(event).value, 1) },
+ onmouseout: helpMouseout
+ });
+ }
+}
+
/** Handle clicks on fields editing
* @param MouseEvent
* @return boolean false to cancel action
}
/** Add table row for next field
-* @param boolean
+* @param [boolean]
* @return boolean false
* @this HTMLInputElement
*/
Adminer 4.7.6-dev:
+Speed up alter table form (regression from 4.4.0)
Fix clicking on non-input fields in alter table (regression from 4.6.2)
MySQL: Always set foreign_key_checks in export
Editor: Fix focusing foreign key search in select
Click on row selects it
Fix Editor date format
Fix long SQL query crash (bug #2839231)
-Speedup of simple alter table
+Speed up simple alter table
Traditional Chinese translation
Adminer 2.0.0 (released 2009-08-06):