]> git.joonet.de Git - adminer.git/commitdiff
Move inline event handlers to <script>
authorJakub Vrana <jakub@vrana.cz>
Fri, 12 Jan 2018 13:55:00 +0000 (14:55 +0100)
committerJakub Vrana <jakub@vrana.cz>
Fri, 12 Jan 2018 16:09:41 +0000 (17:09 +0100)
adminer/include/functions.inc.php

index 475953f9245ebd5998c34adf61b2a8a1097787a1..3f08c4f7057ef0b10364c91b688abd2f9d344ea0 100644 (file)
@@ -885,7 +885,7 @@ function input($field, $value, $function) {
                $attrs .= $onchange;
                $has_function = (in_array($function, $functions) || isset($functions[$function]));
                echo (count($functions) > 1
-                       ? "<select name='function[$name]' onchange='functionChange.call(this);'" . on_help("getTarget(event).value.replace(/^SQL\$/, '')", 1) . ">" . optionlist($functions, $function === null || $has_function ? $function : "") . "</select>"
+                       ? "<select name='function[$name]'" . on_help("getTarget(event).value.replace(/^SQL\$/, '')", 1) . ">" . optionlist($functions, $function === null || $has_function ? $function : "") . "</select><script>qsl('select').onchange = functionChange;</script>"
                        : nbsp(reset($functions))
                ) . '<td>';
                $input = $adminer->editInput($_GET["edit"], $field, $attrs, $value); // usage in call is without a table