]> git.joonet.de Git - adminer.git/commitdiff
Move inline event handlers to <script>
authorJakub Vrana <jakub@vrana.cz>
Fri, 12 Jan 2018 16:19:35 +0000 (17:19 +0100)
committerJakub Vrana <jakub@vrana.cz>
Fri, 12 Jan 2018 16:19:47 +0000 (17:19 +0100)
adminer/include/functions.inc.php
editor/db.inc.php

index 8ce2f709da28ae8c8ff6e315dc826342bab0069e..32eebb8361566fe81b075d9b210ee35acba8558b 100644 (file)
@@ -1341,7 +1341,7 @@ function edit_form($TABLE, $fields, $row, $update) {
        if (!$fields) {
                echo "<p class='error'>" . lang('You have no privileges to update this table.') . "\n";
        } else {
-               echo "<table cellspacing='0' onkeydown='return editingKeydown(event);'>\n";
+               echo "<table cellspacing='0'>" . script("qsl('table').onkeydown = editingKeydown;");
 
                foreach ($fields as $name => $field) {
                        echo "<tr><th>" . $adminer->fieldName($field);
index bfba68e8f4716c0183c990ac703085640af9eb39..1c9781b4cb6be689ba581c208d26a53843d4c723 100644 (file)
@@ -9,7 +9,11 @@ if ($adminer->homepage()) {
        }
        echo "<table cellspacing='0' class='nowrap checkable'>\n";
        echo script("mixin(qsl('table'), {onclick: tableClick, ondblclick: partialArg(tableClick, true)});");
-       echo '<thead><tr class="wrap"><td><input id="check-all" type="checkbox" onclick="formCheck.call(this, /^tables\[/);" class="jsonly"><th>' . lang('Table') . '<td>' . lang('Rows') . "</thead>\n";
+       echo '<thead><tr class="wrap">';
+       echo '<td><input id="check-all" type="checkbox" class="jsonly">' . script("qs('#check-all').onclick = partial(formCheck, /^tables\[/);", "");
+       echo '<th>' . lang('Table');
+       echo '<td>' . lang('Rows');
+       echo "</thead>\n";
        
        foreach (table_status() as $table => $row) {
                $name = $adminer->tableName($row);