From b68ddcad2b53bdc1e4014b652c7f745328429758 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Mon, 21 Mar 2011 12:15:38 +0100 Subject: [PATCH] Send all forms by Ctrl+Enter on ' . (isset($_GET["ns"]) ? '' : "") : ""); // not used in Editor @@ -394,7 +394,7 @@ if (!$columns) { if (!information_schema(DB)) { ?>
- + diff --git a/adminer/static/functions.js b/adminer/static/functions.js index b9f2898d..867aa8a3 100644 --- a/adminer/static/functions.js +++ b/adminer/static/functions.js @@ -161,10 +161,9 @@ function selectAddRow(field) { * @param HTMLTextAreaElement * @param KeyboardEvent * @param boolean handle also Tab -* @param HTMLInputElement submit button * @return boolean */ -function textareaKeydown(target, event, tab, button) { +function textareaKeydown(target, event, tab) { if (tab && !event.shiftKey && !event.altKey && !event.ctrlKey && !event.metaKey) { if (event.keyCode == 9) { // 9 - Tab // inspired by http://pallieter.org/Projects/insertTab/ @@ -190,26 +189,21 @@ function textareaKeydown(target, event, tab, button) { } } } - if (event.ctrlKey && (event.keyCode == 13 || event.keyCode == 10) && !event.altKey && !event.metaKey) { // 13|10 - Enter, shiftKey allowed - target.blur(); - if (button) { - button.click(); - } else if ((!target.form.onsubmit || target.form.onsubmit() !== false) && !ajaxForm(target.form)) { - target.form.submit(); - } - return false; - } return true; } /** Send form by Enter on +Send forms by Ctrl+Enter on