From f498219f293228debe7b58e6fe25e5b13643dda5 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Mon, 14 May 2012 02:16:10 -0700 Subject: [PATCH] Remove eventStop() used by AJAXification in past --- adminer/db.inc.php | 6 +++--- adminer/include/adminer.inc.php | 6 +++--- adminer/include/auth.inc.php | 2 +- adminer/include/connect.inc.php | 4 ++-- adminer/include/functions.inc.php | 5 ++--- adminer/select.inc.php | 2 +- adminer/sql.inc.php | 2 +- editor/include/adminer.inc.php | 6 +++--- editor/static/editing.js | 1 - 9 files changed, 16 insertions(+), 18 deletions(-) diff --git a/adminer/db.inc.php b/adminer/db.inc.php index d452054d..10e626fc 100644 --- a/adminer/db.inc.php +++ b/adminer/db.inc.php @@ -100,14 +100,14 @@ if ($adminer->homepage()) { echo "

" . (ereg('^(sql|sqlite|pgsql)$', $jush) ? ($jush != "sqlite" ? " " : "") . " " : "" - ) . ($jush == "sql" ? " " : "") . " \n"; // 1 - eventStop + ) . ($jush == "sql" ? " " : "") . " \n"; $databases = (support("scheme") ? schemas() : $adminer->databases()); if (count($databases) != 1 && $jush != "sqlite") { $db = (isset($_POST["target"]) ? $_POST["target"] : (support("scheme") ? $_GET["ns"] : DB)); echo "

" . lang('Move to other database') . ": "; echo ($databases ? html_select("target", $databases, $db) : ''); - echo " "; - echo (support("copy") ? " " : ""); + echo " "; + echo (support("copy") ? " " : ""); echo "\n"; } echo "\n"; diff --git a/adminer/include/adminer.inc.php b/adminer/include/adminer.inc.php index 4ace7fa5..8cca2c7d 100644 --- a/adminer/include/adminer.inc.php +++ b/adminer/include/adminer.inc.php @@ -753,7 +753,7 @@ DROP PROCEDURE adminer_alter; foreach ($usernames as $username => $password) { if ($password !== null) { if ($first) { - echo "

\n"; + echo "

\n"; $first = false; } echo "($drivers[$driver]) " . h($username . ($server != "" ? "@$server" : "")) . "
\n"; @@ -774,7 +774,7 @@ DROP PROCEDURE adminer_alter; } } ?> - +

@@ -782,7 +782,7 @@ DROP PROCEDURE adminer_alter;

"(" . lang('database') . ")") + $databases, DB, "this.form.submit();") : ''); ?> - onclick="eventStop(event);"> +> select_db(DB)) { if (support("scheme")) { diff --git a/adminer/include/auth.inc.php b/adminer/include/auth.inc.php index 7731f531..c683fb97 100644 --- a/adminer/include/auth.inc.php +++ b/adminer/include/auth.inc.php @@ -76,7 +76,7 @@ function auth_error($exception = null) { } } page_header(lang('Login'), $error, null); - echo "

\n"; + echo "\n"; $adminer->loginForm(); echo "
"; hidden_fields($_POST, array("auth")); // expired session diff --git a/adminer/include/connect.inc.php b/adminer/include/connect.inc.php index 087df2e1..14e682d9 100644 --- a/adminer/include/connect.inc.php +++ b/adminer/include/connect.inc.php @@ -43,9 +43,9 @@ function connect_error() { } echo "\n"; echo "\n"; - echo "

\n"; // 1 - eventStop + echo "

\n"; echo "\n"; - echo "" . lang('Refresh') . "\n"; + echo "" . lang('Refresh') . "\n"; echo "

\n"; } } diff --git a/adminer/include/functions.inc.php b/adminer/include/functions.inc.php index 2d440aee..e86be627 100644 --- a/adminer/include/functions.inc.php +++ b/adminer/include/functions.inc.php @@ -149,11 +149,10 @@ function html_select($name, $options, $value = "", $onchange = true) { /** Get onclick confirmation * @param string JavaScript expression -* @param bool stop event propagation * @return string */ -function confirm($count = "", $stop = false) { - return " onclick=\"" . ($stop ? "eventStop(event); " : "") . "return confirm('" . lang('Are you sure?') . ($count ? " (' + $count + ')" : "") . "');\""; +function confirm($count = "") { + return " onclick=\"return confirm('" . lang('Are you sure?') . ($count ? " (' + $count + ')" : "") . "');\""; } /** Print header for hidden fieldset (close by
) diff --git a/adminer/select.inc.php b/adminer/select.inc.php index 8ecb7380..c98fc2de 100644 --- a/adminer/select.inc.php +++ b/adminer/select.inc.php @@ -413,7 +413,7 @@ if (!$columns) { $output = $adminer->dumpOutput(); echo ($output ? html_select("output", $output, $adminer_import["output"]) . " " : ""); echo html_select("format", $format, $adminer_import["format"]); - echo " \n"; + echo " \n"; echo "\n"; } } diff --git a/adminer/sql.inc.php b/adminer/sql.inc.php index 42d062bb..0fc465de 100644 --- a/adminer/sql.inc.php +++ b/adminer/sql.inc.php @@ -124,7 +124,7 @@ if (!$error && $_POST) { . html_select("output", $adminer->dumpOutput(), $adminer_export["output"]) . " " . html_select("format", $dump_format, $adminer_export["format"]) . "" - . " \n" + . " \n" ; if ($connection2 && preg_match("~^($space|\\()*SELECT\\b~isU", $q) && ($explain = explain($connection2, $q))) { $id = "explain-$commands"; diff --git a/editor/include/adminer.inc.php b/editor/include/adminer.inc.php index 9c69c98d..4e886177 100644 --- a/editor/include/adminer.inc.php +++ b/editor/include/adminer.inc.php @@ -291,7 +291,7 @@ ORDER BY ORDINAL_POSITION", null, "") as $row) { //! requires MySQL 5 echo "
\n"; echo "

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

\n"; //! Ctrl+Enter for this.form.email + echo "

\n"; echo "

" . html_select("email_addition", $columns, $_POST["email_addition"]) . "\n"; //! JavaScript echo "

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

" . (count($emailFields) == 1 ? '' : html_select("email_field", $emailFields)); @@ -528,7 +528,7 @@ ORDER BY ORDINAL_POSITION", null, "") as $row) { //! requires MySQL 5 foreach ((array) $_SESSION["pwds"]["server"][""] as $username => $password) { if ($password !== null) { if ($first) { - echo "

\n"; + echo "

\n"; $first = false; } echo "" . ($username != "" ? h($username) : "" . lang('empty') . "") . "
\n"; @@ -538,7 +538,7 @@ ORDER BY ORDINAL_POSITION", null, "") as $row) { //! requires MySQL 5 ?>

- +

diff --git a/editor/static/editing.js b/editor/static/editing.js index 75f425c3..662c45f4 100644 --- a/editor/static/editing.js +++ b/editor/static/editing.js @@ -9,7 +9,6 @@ function whisperClick(event, field) { field.value = el.firstChild.data; field.previousSibling.value = decodeURIComponent(el.href.replace(/.*=/, '')); field.nextSibling.style.display = 'none'; - eventStop(event); return false; } }