diff --git a/adminer/database.inc.php b/adminer/database.inc.php index 90f720e4..38b24c86 100644 --- a/adminer/database.inc.php +++ b/adminer/database.inc.php @@ -57,7 +57,7 @@ if ($_POST) {

' . h($name) . '
' + ? '
' : '' ) . "\n" . ($collations ? html_select("collation", array("" => "(" . lang('collation') . ")") + $collations, $collate) : ""); ?> diff --git a/adminer/dump.inc.php b/adminer/dump.inc.php index 4703be49..bb692d2a 100644 --- a/adminer/dump.inc.php +++ b/adminer/dump.inc.php @@ -218,7 +218,7 @@ if (DB != "") { } } } else { - echo ""; + echo ""; } } ?> diff --git a/adminer/include/editing.inc.php b/adminer/include/editing.inc.php index 7dc9240a..ccb2a95f 100644 --- a/adminer/include/editing.inc.php +++ b/adminer/include/editing.inc.php @@ -106,7 +106,7 @@ function referencable_primary($self) { * @return null */ function textarea($name, $value, $rows = 10, $cols = 80) { - echo "'; // 1.2em - line-height + echo "'; // 1.2em - line-height } else { // int(3) is only a display hint $maxlength = (!ereg('int', $field["type"]) && preg_match('~^(\\d+)(,(\\d+))?$~', $field["length"], $match) ? ((ereg("binary", $field["type"]) ? 2 : 1) * $match[1] + ($match[3] ? 1 : 0) + ($match[2] && !$field["unsigned"] ? 1 : 0)) : ($types[$field["type"]] ? $types[$field["type"]] + ($field["unsigned"] ? 0 : 1) : 0)); diff --git a/adminer/select.inc.php b/adminer/select.inc.php index 914f38e0..a7d85d71 100644 --- a/adminer/select.inc.php +++ b/adminer/select.inc.php @@ -349,7 +349,7 @@ if (!$columns) { $editable = is_utf8($val) && $rows[$n][$key] == $row[$key] && !$functions[$key]; $text = ereg('text|lob', $field["type"]); echo (($_GET["modify"] && $editable) || isset($value) - ? "" . ($text ? "" : "") + ? "" . ($text ? "" : "") : "" . $adminer->selectVal($val, $link, $field) ); } diff --git a/adminer/static/functions.js b/adminer/static/functions.js index 867aa8a3..7e2f39ff 100644 --- a/adminer/static/functions.js +++ b/adminer/static/functions.js @@ -157,14 +157,13 @@ function selectAddRow(field) { -/** Handle Ctrl+Enter and optionally Tab in textarea +/** Handle Tab and Esc in textarea * @param HTMLTextAreaElement * @param KeyboardEvent -* @param boolean handle also Tab * @return boolean */ -function textareaKeydown(target, event, tab) { - if (tab && !event.shiftKey && !event.altKey && !event.ctrlKey && !event.metaKey) { +function textareaKeydown(target, event) { + if (!event.shiftKey && !event.altKey && !event.ctrlKey && !event.metaKey) { if (event.keyCode == 9) { // 9 - Tab // inspired by http://pallieter.org/Projects/insertTab/ if (target.setSelectionRange) { @@ -187,6 +186,7 @@ function textareaKeydown(target, event, tab) { break; } } + return false; } } return true; @@ -421,9 +421,6 @@ function selectDblClick(td, event, text) { rows++; }); input.rows = rows; - input.onkeydown = function (event) { - return textareaKeydown(input, event || window.event); - }; } if (document.selection) { var range = document.selection.createRange(); diff --git a/editor/include/adminer.inc.php b/editor/include/adminer.inc.php index eed82cc6..63a28d53 100644 --- a/editor/include/adminer.inc.php +++ b/editor/include/adminer.inc.php @@ -281,7 +281,7 @@ ORDER BY ORDINAL_POSITION", null, "") as $row) { //! requires MySQL 5 print_fieldset("email", lang('E-mail'), $_POST["email_append"]); echo "

" . lang('From') . ": \n"; echo lang('Subject') . ": \n"; - echo "


\n"; + echo "


\n"; //! Ctrl+Enter for this.form.email echo html_select("email_addition", $columns, $_POST["email_addition"]) . "\n"; //! JavaScript echo "

" . lang('Attachments') . ": "; echo "

" . (count($emailFields) == 1 ? '' : html_select("email_field", $emailFields)); diff --git a/plugins/edit-textarea.php b/plugins/edit-textarea.php index d9245618..c2f1c421 100644 --- a/plugins/edit-textarea.php +++ b/plugins/edit-textarea.php @@ -9,7 +9,7 @@ class AdminerEditTextarea { function editInput($table, $field, $attrs, $value) { if (ereg('char', $field["type"])) { - return "'; + return "'; } }