diff --git a/adminer/create.inc.php b/adminer/create.inc.php index 19f0685a..0224c872 100644 --- a/adminer/create.inc.php +++ b/adminer/create.inc.php @@ -199,7 +199,6 @@ edit_fields($row["fields"], $collations, "TABLE", $foreign_keys);

: "> - + - - - - - - -NULL -AI "example-auto-increment.html", - 'mariadb' => "auto_increment/", - 'sqlite' => "autoinc.html", - 'pgsql' => "datatype-numeric.html#DATATYPE-SERIAL", - 'mssql' => "ms186775.aspx", -)); ?> -> -" . lang('Comment') : ""); ?> - -" . script("row_count = " . count($fields) . ";"); ?> - + + + + + + + NULL + AI "example-auto-increment.html", + 'mariadb' => "auto_increment/", + 'sqlite' => "autoinc.html", + 'pgsql' => "datatype-numeric.html#DATATYPE-SERIAL", + 'mssql' => "ms186775.aspx", + ]); ?> + + + " . lang('Comment') . "" : ""); ?> + + " . script("row_count = " . count($fields) . ";"); ?> + -> -" . html_select("fields[$i][inout]", explode("|", $inout), $field["inout"]) : ""); ?> -" data-maxlength="64" autocapitalize="off" aria-labelledby="label-name"> - - - ->" aria-labelledby="label-default">" : ""); + + $style = $display ? "" : "style='display: none;'"; + echo "\n"; + + if ($type == "PROCEDURE") { + echo "", html_select("fields[$i][inout]", explode("|", $inout), $field["inout"]), "\n"; } + + echo ""; + if ($display) { + echo ""; + } + echo ""; + edit_type("fields[$i]", $field, $collations, $foreign_keys); + echo "\n"; + + if ($type == "TABLE") { + echo "", checkbox("fields[$i][null]", 1, $field["null"], "", "", "block", "label-null"), "\n"; + + $checked = $field["auto_increment"] ? "checked" : ""; + echo "\n"; + + echo "", + checkbox("fields[$i][has_default]", 1, $field["has_default"], "", "", "", "label-default"), + "", + "\n"; + + if (support("comment")) { + $max_length = min_version(5.5) ? 1024 : 255; + echo "", + "", + "\n"; + } + } + echo ""; - echo (support("move_col") ? - " " - . " " - . " " - : ""); - echo ($orig == "" || support("drop_col") ? "" : ""); + if (support("move_col")) { + echo " ", + " ", + " "; + } + if ($orig == "" || support("drop_col")) { + echo ""; + } + echo "\n\n"; } } diff --git a/adminer/static/default.css b/adminer/static/default.css index 4cd9ac6b..41c081a8 100644 --- a/adminer/static/default.css +++ b/adminer/static/default.css @@ -25,7 +25,7 @@ pre code { display: block; font-size: 100%; } pre, textarea { font: 110%/1.25 monospace; } pre.jush { background: #fff; } input, textarea, select { box-sizing: border-box; } -input, select { vertical-align: middle; } +input:not([type="radio"]), select { vertical-align: middle; } input[type="number"] { -moz-appearance: textfield; } input::-webkit-inner-spin-button { -webkit-appearance: none; } input.default { box-shadow: 1px 1px 1px #777; } @@ -38,7 +38,8 @@ input::placeholder { color: #000; opacity: 0.4; } .version { color: #777; font-size: 62%; } .js .hidden, .nojs .jsonly { display: none; } .js .column { position: absolute; background: #ddf; padding: .27em 1ex .3em 0; margin-top: -.27em; } -.nowrap td, .nowrap th, td.nowrap, p.nowrap { white-space: pre; } +.nowrap { white-space: nowrap; } +p.nowrap { white-space: pre; } .wrap td { white-space: normal; } .error { color: red; background: #fee; } .error b { background: #fff; font-weight: normal; }