Wrap table.nowrap with div[style="overflow-x: auto"]

This commit is contained in:
kPherox 2018-10-25 19:31:28 +09:00 committed by Jakub Vrana
parent 83a0776e8d
commit e4837a0564
10 changed files with 20 additions and 1 deletions

View file

@ -170,6 +170,7 @@ foreach ($engines as $engine) {
<?php } ?>
<?php if (support("columns")) { ?>
<div style="overflow-x: auto;">
<table cellspacing="0" id="edit-fields" class="nowrap">
<?php
$comments = ($_POST ? $_POST["comments"] : $row["Comment"] != "");
@ -184,6 +185,7 @@ if (!$_POST && !$comments) {
edit_fields($row["fields"], $collations, "TABLE", $foreign_keys, $comments);
?>
</table>
</div>
<p>
<?php echo lang('Auto Increment'); ?>: <input type="number" name="Auto_increment" size="6" value="<?php echo h($row["Auto_increment"]); ?>">
<?php echo checkbox("defaults", 1, !$_POST || $_POST["defaults"], lang('Default values'), "columnShow(this.checked, 5)", "jsonly"); ?>

View file

@ -66,6 +66,7 @@ if ($adminer->homepage()) {
}
}
$doc_link = doc_link(array('sql' => 'show-table-status.html'));
echo "<div style='overflow-x: auto;'>\n";
echo "<table cellspacing='0' class='nowrap checkable'>\n";
echo script("mixin(qsl('table'), {onclick: tableClick, ondblclick: partialArg(tableClick, true)});");
echo '<thead><tr class="wrap">';
@ -119,6 +120,7 @@ if ($adminer->homepage()) {
}
echo "</table>\n";
echo "</div>\n";
if (!information_schema(DB)) {
echo "<div class='footer'><div>\n";
$vacuum = "<input type='submit' value='" . lang('Vacuum') . "'> " . on_help("'VACUUM'");

View file

@ -310,6 +310,7 @@ class Adminer {
* @return null
*/
function tableStructurePrint($fields) {
echo "<div style='overflow-x: auto;'>\n";
echo "<table cellspacing='0' class='nowrap'>\n";
echo "<thead><tr><th>" . lang('Column') . "<td>" . lang('Type') . (support("comment") ? "<td>" . lang('Comment') : "") . "</thead>\n";
foreach ($fields as $field) {
@ -322,6 +323,7 @@ class Adminer {
echo "\n";
}
echo "</table>\n";
echo "</div>\n";
}
/** Print list of indexes on table in tabular format

View file

@ -17,6 +17,7 @@ function select($result, $connection2 = null, $orgtables = array(), $limit = 0)
odd(''); // reset odd for each result
for ($i=0; (!$limit || $i < $limit) && ($row = $result->fetch_row()); $i++) {
if (!$i) {
echo "<div style='overflow-x: auto;'>\n";
echo "<table cellspacing='0' class='nowrap'>\n";
echo "<thead><tr>";
for ($j=0; $j < count($row); $j++) {
@ -85,7 +86,7 @@ function select($result, $connection2 = null, $orgtables = array(), $limit = 0)
echo "<td>$val";
}
}
echo ($i ? "</table>" : "<p class='message'>" . lang('No rows.')) . "\n";
echo ($i ? "</table>\n</div>" : "<p class='message'>" . lang('No rows.')) . "\n";
return $return;
}

View file

@ -94,6 +94,7 @@ if (!$row) {
?>
<form action="" method="post">
<div style="overflow-x: auto;">
<table cellspacing="0" class="nowrap">
<thead><tr>
<th id="label-type"><?php echo lang('Index Type'); ?>
@ -138,6 +139,7 @@ foreach ($row["indexes"] as $index) {
}
?>
</table>
</div>
<p>
<input type="submit" value="<?php echo lang('Save'); ?>">
<input type="hidden" name="token" value="<?php echo $token; ?>">

View file

@ -38,6 +38,7 @@ $routine_languages = routine_languages();
<p><?php echo lang('Name'); ?>: <input name="name" value="<?php echo h($row["name"]); ?>" data-maxlength="64" autocapitalize="off">
<?php echo ($routine_languages ? lang('Language') . ": " . html_select("language", $routine_languages, $row["language"]) . "\n" : ""); ?>
<input type="submit" value="<?php echo lang('Save'); ?>">
<div style="overflow-x: auto;">
<table cellspacing="0" class="nowrap">
<?php
edit_fields($row["fields"], $collations, $routine);
@ -47,6 +48,7 @@ if (isset($_GET["function"])) {
}
?>
</table>
</div>
<p><?php textarea("definition", $row["definition"]); ?>
<p>
<input type="submit" value="<?php echo lang('Save'); ?>">

View file

@ -13,6 +13,7 @@ page_header(lang('Process list'), $error);
?>
<form action="" method="post">
<div style="overflow-x: auto;">
<table cellspacing="0" class="nowrap checkable">
<?php
echo script("mixin(qsl('table'), {onclick: tableClick, ondblclick: partialArg(tableClick, true)});");
@ -45,6 +46,7 @@ foreach (process_list() as $i => $row) {
}
?>
</table>
</div>
<p>
<?php
if (support("kill")) {

View file

@ -309,6 +309,7 @@ if (!$columns && support("table")) {
} else {
$backward_keys = $adminer->backwardKeys($TABLE, $table_name);
echo "<div style='overflow-x: auto;'>";
echo "<table id='table' cellspacing='0' class='nowrap checkable'>";
echo script("mixin(qs('#table'), {onclick: tableClick, ondblclick: partialArg(tableClick, true), onkeydown: editingKeydown});");
echo "<thead><tr>" . (!$group && $select
@ -459,6 +460,7 @@ if (!$columns && support("table")) {
exit;
}
echo "</table>\n";
echo "</div>\n";
}
if (!is_ajax()) {

View file

@ -7,6 +7,7 @@ if ($adminer->homepage()) {
if ($_POST["query"] != "") {
search_tables();
}
echo "<div style='overflow-x: auto;'>\n";
echo "<table cellspacing='0' class='nowrap checkable'>\n";
echo script("mixin(qsl('table'), {onclick: tableClick, ondblclick: partialArg(tableClick, true)});");
echo '<thead><tr class="wrap">';
@ -26,6 +27,7 @@ if ($adminer->homepage()) {
}
echo "</table>\n";
echo "</div>\n";
echo "</form>\n";
echo script("tableCheck();");
}

View file

@ -13,6 +13,7 @@ class AdminerTableStructure {
* @return bool
*/
function tableStructurePrint($fields) {
echo "<div style='overflow-x: auto;'>\n";
echo "<table cellspacing='0' class='nowrap'>\n";
echo "<thead><tr><th>" . lang('Column') . "<th>" . lang('Type') . "<th>" . lang('Nullable') . "<th>" . lang('Default') . (support("comment") ? "<th>" . lang('Comment') : "") . "</thead>\n";
foreach ($fields as $field) {
@ -26,6 +27,7 @@ class AdminerTableStructure {
echo "\n";
}
echo "</table>\n";
echo "</div>\n";
return true;
}
}