]> git.joonet.de Git - adminer.git/commitdiff
Wrap `table.nowrap` with `div[style="overflow-x: auto"]`
authorkPherox <admin@mail.kr-kp.com>
Thu, 25 Oct 2018 10:31:28 +0000 (19:31 +0900)
committerJakub Vrana <jakub@vrana.cz>
Sat, 27 Oct 2018 19:16:57 +0000 (21:16 +0200)
adminer/create.inc.php
adminer/db.inc.php
adminer/include/adminer.inc.php
adminer/include/editing.inc.php
adminer/indexes.inc.php
adminer/procedure.inc.php
adminer/processlist.inc.php
adminer/select.inc.php
editor/db.inc.php
plugins/table-structure.php

index 7d355ba0140321667256750b816a9525e36b3524..29e9ce801e51ad65b77cd6915cd38d065e5fefa5 100644 (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"); ?>
index b3e71b951de9c6a06b321cf4ce252f79306d40f0..8c25010ef7d3f1e9781a9138d3f609daaa7b7b15 100644 (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'");
index a5963b3a29b08566b24ecafeab728b3ec88e02e5..6ca736f6889c4f878a34718bb98a837fc982ca5f 100644 (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
index 33a52d53a2f6e6148245fda563b5006fbc61efa7..1c43b8d014f84f7d77e8332608acad6ed2bee1b9 100644 (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;
 }
 
index 1d489562d441f2bd4404f53152a059740d050dc8..cf2c0cd7992cdf76ef4d9815b1d8b50e67d289a3 100644 (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; ?>">
index c6550b0f0d22b0262f92934cf93b2e473a5c0674..6d7b083abee46fc8e04ef50674525a33fd575ecf 100644 (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'); ?>">
index 00a79714fc136f6040bb490a02ffdbb63f216e91..6ffe9b09297b5902a1fa73d131971a6b1f5413d8 100644 (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")) {
index b01cb069b09c58260ac59c20f90c284ff8afdb19..27faa3fde9252b1b1647419b7896f588e036c5a6 100644 (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()) {
index 6cc38b20e74cc61f96e7e47eb8e8be61513b266c..fd6ce937d2b39914c52c28d114ace07c6a061e55 100644 (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();");
 }
index cd639b59075f72260d177a64eab00ce8290cace4..b90386ec57e452c0d1d0a257754ec12f7fa9b643 100644 (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;
        }
 }