]> git.joonet.de Git - adminer.git/commitdiff
Remove eventStop() used by AJAXification in past
authorJakub Vrana <jakub@vrana.cz>
Mon, 14 May 2012 09:16:10 +0000 (02:16 -0700)
committerJakub Vrana <jakub@vrana.cz>
Mon, 14 May 2012 09:22:44 +0000 (02:22 -0700)
adminer/db.inc.php
adminer/include/adminer.inc.php
adminer/include/auth.inc.php
adminer/include/connect.inc.php
adminer/include/functions.inc.php
adminer/select.inc.php
adminer/sql.inc.php
editor/include/adminer.inc.php
editor/static/editing.js

index d452054d3ab152cb09785eda5a9f324233fdd9d1..10e626fc191c633dcf122c0b8ea314264b3e0d76 100644 (file)
@@ -100,14 +100,14 @@ if ($adminer->homepage()) {
                                echo "<p>" . (ereg('^(sql|sqlite|pgsql)$', $jush)
                                        ? ($jush != "sqlite" ? "<input type='submit' value='" . lang('Analyze') . "'> " : "")
                                        . "<input type='submit' name='optimize' value='" . lang('Optimize') . "'> " : ""
-                               ) . ($jush == "sql" ? "<input type='submit' name='check' value='" . lang('Check') . "'> <input type='submit' name='repair' value='" . lang('Repair') . "'> " : "") . "<input type='submit' name='truncate' value='" . lang('Truncate') . "'" . confirm("formChecked(this, /tables/)") . "> <input type='submit' name='drop' value='" . lang('Drop') . "'" . confirm("formChecked(this, /tables|views/)", 1) . ">\n"; // 1 - eventStop
+                               ) . ($jush == "sql" ? "<input type='submit' name='check' value='" . lang('Check') . "'> <input type='submit' name='repair' value='" . lang('Repair') . "'> " : "") . "<input type='submit' name='truncate' value='" . lang('Truncate') . "'" . confirm("formChecked(this, /tables/)") . "> <input type='submit' name='drop' value='" . lang('Drop') . "'" . confirm("formChecked(this, /tables|views/)") . ">\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 "<p>" . lang('Move to other database') . ": ";
                                        echo ($databases ? html_select("target", $databases, $db) : '<input name="target" value="' . h($db) . '">');
-                                       echo " <input type='submit' name='move' value='" . lang('Move') . "' onclick='eventStop(event);'>";
-                                       echo (support("copy") ? " <input type='submit' name='copy' value='" . lang('Copy') . "' onclick='eventStop(event);'>" : "");
+                                       echo " <input type='submit' name='move' value='" . lang('Move') . "'>";
+                                       echo (support("copy") ? " <input type='submit' name='copy' value='" . lang('Copy') . "'>" : "");
                                        echo "\n";
                                }
                                echo "<input type='hidden' name='token' value='$token'>\n";
index 4ace7fa54106ac18b47efbc86a024d2c38cdf9ab..8cca2c7db668548c89f6b11c98d82d18922af71f 100644 (file)
@@ -753,7 +753,7 @@ DROP PROCEDURE adminer_alter;
                                        foreach ($usernames as $username => $password) {
                                                if ($password !== null) {
                                                        if ($first) {
-                                                               echo "<p onclick='eventStop(event);'>\n";
+                                                               echo "<p>\n";
                                                                $first = false;
                                                        }
                                                        echo "<a href='" . h(auth_url($driver, $server, $username)) . "'>($drivers[$driver]) " . h($username . ($server != "" ? "@$server" : "")) . "</a><br>\n";
@@ -774,7 +774,7 @@ DROP PROCEDURE adminer_alter;
                                }
                        }
                        ?>
-<input type="submit" name="logout" value="<?php echo lang('Logout'); ?>" onclick="eventStop(event);">
+<input type="submit" name="logout" value="<?php echo lang('Logout'); ?>">
 <input type="hidden" name="token" value="<?php echo $token; ?>">
 </p>
 </form>
@@ -782,7 +782,7 @@ DROP PROCEDURE adminer_alter;
 <p>
 <?php hidden_fields_get(); ?>
 <?php echo ($databases ? html_select("db", array("" => "(" . lang('database') . ")") + $databases, DB, "this.form.submit();") : '<input name="db" value="' . h(DB) . '">'); ?>
-<input type="submit" value="<?php echo lang('Use'); ?>"<?php echo ($databases ? " class='hidden'" : ""); ?> onclick="eventStop(event);">
+<input type="submit" value="<?php echo lang('Use'); ?>"<?php echo ($databases ? " class='hidden'" : ""); ?>>
 <?php
                        if ($missing != "db" && DB != "" && $connection->select_db(DB)) {
                                if (support("scheme")) {
index 7731f53174af4b453b6286e0797966f534ca4430..c683fb97140a9b1ffa8fa35f137849a188f05c52 100644 (file)
@@ -76,7 +76,7 @@ function auth_error($exception = null) {
                }
        }
        page_header(lang('Login'), $error, null);
-       echo "<form action='' method='post' onclick='eventStop(event);'>\n";
+       echo "<form action='' method='post'>\n";
        $adminer->loginForm();
        echo "<div>";
        hidden_fields($_POST, array("auth")); // expired session
index 087df2e188aa6248f5f70af796297c7bf7f15aa9..14e682d9ce20aa8a942cb81effcecf6635201e3d 100644 (file)
@@ -43,9 +43,9 @@ function connect_error() {
                        }
                        echo "</table>\n";
                        echo "<script type='text/javascript'>tableCheck();</script>\n";
-                       echo "<p><input type='submit' name='drop' value='" . lang('Drop') . "'" . confirm("formChecked(this, /db/)", 1) . ">\n"; // 1 - eventStop
+                       echo "<p><input type='submit' name='drop' value='" . lang('Drop') . "'" . confirm("formChecked(this, /db/)") . ">\n";
                        echo "<input type='hidden' name='token' value='$token'>\n";
-                       echo "<a href='" . h(ME) . "refresh=1' onclick='eventStop(event);'>" . lang('Refresh') . "</a>\n";
+                       echo "<a href='" . h(ME) . "refresh=1'>" . lang('Refresh') . "</a>\n";
                        echo "</form>\n";
                }
        }
index 2d440aee24299a14b4a3674251387acfd1d85a13..e86be6275d6acac0edd8a30271c0de18e817de3a 100644 (file)
@@ -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 </div></fieldset>)
index 8ecb73803c7d78c8fc8e8460a28edefe80be55c2..c98fc2de8f42854ca2bc49c9d91359173b192837 100644 (file)
@@ -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 " <input type='submit' name='export' value='" . lang('Export') . "' onclick='eventStop(event);'>\n";
+                               echo " <input type='submit' name='export' value='" . lang('Export') . "'>\n";
                                echo "</div></fieldset>\n";
                        }
                }
index 42d062bbcdf3e0bcdd7c8363c324787a1834c500..0fc465de2768405ad2ce2bb0b8356ffc3547bd10 100644 (file)
@@ -124,7 +124,7 @@ if (!$error && $_POST) {
                                                                                . html_select("output", $adminer->dumpOutput(), $adminer_export["output"]) . " "
                                                                                . html_select("format", $dump_format, $adminer_export["format"])
                                                                                . "<input type='hidden' name='query' value='" . h($q) . "'>"
-                                                                               . " <input type='submit' name='export' value='" . lang('Export') . "' onclick='eventStop(event);'><input type='hidden' name='token' value='$token'></span>\n"
+                                                                               . " <input type='submit' name='export' value='" . lang('Export') . "'><input type='hidden' name='token' value='$token'></span>\n"
                                                                        ;
                                                                        if ($connection2 && preg_match("~^($space|\\()*SELECT\\b~isU", $q) && ($explain = explain($connection2, $q))) {
                                                                                $id = "explain-$commands";
index 9c69c98d7cf87f933aa4216e13e74244ff6cbe02..4e8861778b507eeab591f5ca9d0a6063f509a221 100644 (file)
@@ -291,7 +291,7 @@ ORDER BY ORDINAL_POSITION", null, "") as $row) { //! requires MySQL 5
                        echo "<div onkeydown=\"eventStop(event); return bodyKeydown(event, 'email');\">\n";
                        echo "<p>" . lang('From') . ": <input name='email_from' value='" . h($_POST ? $_POST["email_from"] : $_COOKIE["adminer_email"]) . "'>\n";
                        echo lang('Subject') . ": <input name='email_subject' value='" . h($_POST["email_subject"]) . "'>\n";
-                       echo "<p><textarea name='email_message' rows='15' cols='75'>" . h($_POST["email_message"] . ($_POST["email_append"] ? '{$' . "$_POST[email_addition]}" : "")) . "</textarea>\n"; //! Ctrl+Enter for this.form.email
+                       echo "<p><textarea name='email_message' rows='15' cols='75'>" . h($_POST["email_message"] . ($_POST["email_append"] ? '{$' . "$_POST[email_addition]}" : "")) . "</textarea>\n";
                        echo "<p onkeydown=\"eventStop(event); return bodyKeydown(event, 'email_append');\">" . html_select("email_addition", $columns, $_POST["email_addition"]) . "<input type='submit' name='email_append' value='" . lang('Insert') . "'>\n"; //! JavaScript
                        echo "<p>" . lang('Attachments') . ": <input type='file' name='email_files[]' onchange=\"this.onchange = function () { }; var el = this.cloneNode(true); el.value = ''; this.parentNode.appendChild(el);\">";
                        echo "<p>" . (count($emailFields) == 1 ? '<input type="hidden" name="email_field" value="' . h(key($emailFields)) . '">' : 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 "<p onclick='eventStop(event);'>\n";
+                                               echo "<p>\n";
                                                $first = false;
                                        }
                                        echo "<a href='" . h(auth_url("server", "", $username)) . "'>" . ($username != "" ? h($username) : "<i>" . lang('empty') . "</i>") . "</a><br>\n";
@@ -538,7 +538,7 @@ ORDER BY ORDINAL_POSITION", null, "") as $row) { //! requires MySQL 5
                        ?>
 <form action="" method="post">
 <p class="logout">
-<input type="submit" name="logout" value="<?php echo lang('Logout'); ?>" onclick="eventStop(event);">
+<input type="submit" name="logout" value="<?php echo lang('Logout'); ?>">
 <input type="hidden" name="token" value="<?php echo $token; ?>">
 </p>
 </form>
index 75f425c38205e63e45890e551410bee06c681106..662c45f462753429c70ee43d9739df3859ee3776 100644 (file)
@@ -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;
        }
 }