Move inline event handlers to <script>

This commit is contained in:
Jakub Vrana 2018-01-12 14:55:00 +01:00
parent 6b2ba65084
commit 12fbfc9847

View 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