Skip to content
Browse files

Remove eventStop() used by AJAXification in past

  • Loading branch information...
1 parent 2db14e4 commit f498219f293228debe7b58e6fe25e5b13643dda5 @vrana vrana committed May 14, 2012
View
6 adminer/db.inc.php
@@ -100,14 +100,14 @@
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";
View
6 adminer/include/adminer.inc.php
@@ -753,7 +753,7 @@ function navigation($missing) {
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,15 +774,15 @@ function navigation($missing) {
}
}
?>
-<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>
<form action="">
<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")) {
View
2 adminer/include/auth.inc.php
@@ -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
View
4 adminer/include/connect.inc.php
@@ -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";
}
}
View
5 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 </div></fieldset>)
View
2 adminer/select.inc.php
@@ -413,7 +413,7 @@
$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";
}
}
View
2 adminer/sql.inc.php
@@ -124,7 +124,7 @@
. 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";
View
6 editor/include/adminer.inc.php
@@ -291,7 +291,7 @@ function selectEmailPrint($emailFields, $columns) {
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 @@ function navigation($missing) {
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 @@ function navigation($missing) {
?>
<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>
View
1 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;
}
}

0 comments on commit f498219

Please sign in to comment.
Something went wrong with that request. Please try again.