1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-14 02:23:59 +02:00

Edit select SQL query on Ctrl+click

This commit is contained in:
Jakub Vrana
2013-04-04 18:15:18 -07:00
parent e4d5835dab
commit 1a1b800b40
4 changed files with 8 additions and 8 deletions

View File

@@ -165,9 +165,9 @@ username.form['auth[driver]'].onchange();
*/
function selectQuery($query) {
global $jush, $token;
return "<form action='" . h(ME) . "sql=' method='post'><p><span>"
return "<form action='" . h(ME) . "sql=' method='post'><p><span onclick=\"return !selectEditSql(event, this, '" . lang('Execute') . "');\">"
. "<code class='jush-$jush'>" . h(str_replace("\n", " ", $query)) . "</code>"
. " <a href='" . h(ME) . "sql=" . urlencode($query) . "' onclick=\"return !selectEditSql(event, this.parentNode, '" . lang('Execute') . "');\">" . lang('Edit') . "</a>"
. " <a href='" . h(ME) . "sql=" . urlencode($query) . "'>" . lang('Edit') . "</a>"
. "</span><input type='hidden' name='token' value='$token'></p></form>\n"; // </p> - required for IE9 inline edit
}