mirror of
https://github.com/vrana/adminer.git
synced 2025-08-08 15:47:00 +02:00
In-place editation in select
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1487 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
@@ -515,7 +515,7 @@ function input($field, $value, $function) {
|
||||
} elseif (ereg('binary|blob|bytea', $field["type"]) && ini_bool("file_uploads")) {
|
||||
echo "<input type='file' name='fields-$name'$onchange>";
|
||||
} elseif (ereg('text|blob', $field["type"])) {
|
||||
echo "<textarea cols='50' rows='" . ($driver != "sqlite" || ereg("\n", $value) ? 12 : 1) . "'$attrs>" . h($value) . '</textarea>';
|
||||
echo "<textarea " . ($driver != "sqlite" || ereg("\n", $value) ? "cols='50' rows='12'" : "cols='30' rows='1' style='height: 1.2em;'") . "$attrs>" . h($value) . '</textarea>'; // 1.2em - line-height
|
||||
} else {
|
||||
// int(3) is only a display hint
|
||||
$maxlength = (!ereg('int', $field["type"]) && preg_match('~^([0-9]+)(,([0-9]+))?$~', $field["length"], $match) ? ($match[1] + ($match[3] ? 1 : 0) + ($match[2] && !$field["unsigned"] ? 1 : 0)) : ($types[$field["type"]] ? $types[$field["type"]] + ($field["unsigned"] ? 0 : 1) : 0));
|
||||
|
Reference in New Issue
Block a user