if (DB != "") {
$checked = ($TABLE != "" ? "" : " checked");
echo "<thead><tr>";
- echo "<th style='text-align: left;'><label class='block'><input type='checkbox' id='check-tables'$checked onclick='formCheck.call(this, /^tables\\[/);'>" . lang('Tables') . "</label>";
- echo "<th style='text-align: right;'><label class='block'>" . lang('Data') . "<input type='checkbox' id='check-data'$checked onclick='formCheck.call(this, /^data\\[/);'></label>";
+ echo "<th style='text-align: left;'><label class='block'><input type='checkbox' id='check-tables'$checked>" . lang('Tables') . "</label>" . script("qs('#check-tables').onclick = partial(formCheck, /^tables\\[/);", "");
+ echo "<th style='text-align: right;'><label class='block'>" . lang('Data') . "<input type='checkbox' id='check-data'$checked></label>" . script("qs('#check-data').onclick = partial(formCheck, /^data\\[/);", "");
echo "</thead>\n";
$views = "";
}
} else {
- echo "<thead><tr><th style='text-align: left;'><label class='block'><input type='checkbox' id='check-databases'" . ($TABLE == "" ? " checked" : "") . " onclick='formCheck.call(this, /^databases\\[/);'>" . lang('Database') . "</label></thead>\n";
+ echo "<thead><tr><th style='text-align: left;'>";
+ echo "<label class='block'><input type='checkbox' id='check-databases'" . ($TABLE == "" ? " checked" : "") . ">" . lang('Database') . "</label>";
+ echo script("qs('#check-databases').onclick = partial(formCheck, /^databases\\[/);", "");
+ echo "</thead>\n";
$databases = $adminer->databases();
if ($databases) {
foreach ($databases as $db) {
<?php } ?>
<?php } ?>
-<body class="<?php echo lang('ltr'); ?> nojs" onkeydown="bodyKeydown(event);" onclick="bodyClick(event);"<?php echo (isset($_COOKIE["adminer_version"]) ? "" : " onload=\"verifyVersion('$VERSION');\""); ?>>
+<body class="<?php echo lang('ltr'); ?> nojs">
<script>
+mixin(document.body, {onkeydown: bodyKeydown, onclick: bodyClick<?php echo (isset($_COOKIE["adminer_version"]) ? "" : ", onload: partial(verifyVersion, '$VERSION')"); ?>});
document.body.className = document.body.className.replace(/ nojs/, ' js');
var offlineMessage = '<?php echo js_escape(lang('You are offline.')); ?>';
</script>
}
?>
-<div id="schema" style="height: <?php echo $top; ?>em;" onselectstart="return false;">
+<div id="schema" style="height: <?php echo $top; ?>em;">
<script>
+qs('#schema').onselectstart = function () { return false; };
var tablePos = {<?php echo implode(",", $table_pos_js) . "\n"; ?>};
var em = qs('#schema').offsetHeight / <?php echo $top; ?>;
document.onmousemove = schemaMousemove;