Change inline style to class name

This commit is contained in:
Jakub Vrana 2018-10-27 21:20:56 +02:00
parent e4837a0564
commit 5b443a4e7d
12 changed files with 12 additions and 10 deletions

View file

@ -170,7 +170,7 @@ foreach ($engines as $engine) {
<?php } ?> <?php } ?>
<?php if (support("columns")) { ?> <?php if (support("columns")) { ?>
<div style="overflow-x: auto;"> <div class="scrollable">
<table cellspacing="0" id="edit-fields" class="nowrap"> <table cellspacing="0" id="edit-fields" class="nowrap">
<?php <?php
$comments = ($_POST ? $_POST["comments"] : $row["Comment"] != ""); $comments = ($_POST ? $_POST["comments"] : $row["Comment"] != "");

View file

@ -66,7 +66,7 @@ if ($adminer->homepage()) {
} }
} }
$doc_link = doc_link(array('sql' => 'show-table-status.html')); $doc_link = doc_link(array('sql' => 'show-table-status.html'));
echo "<div style='overflow-x: auto;'>\n"; echo "<div class='scrollable'>\n";
echo "<table cellspacing='0' class='nowrap checkable'>\n"; echo "<table cellspacing='0' class='nowrap checkable'>\n";
echo script("mixin(qsl('table'), {onclick: tableClick, ondblclick: partialArg(tableClick, true)});"); echo script("mixin(qsl('table'), {onclick: tableClick, ondblclick: partialArg(tableClick, true)});");
echo '<thead><tr class="wrap">'; echo '<thead><tr class="wrap">';

View file

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

View file

@ -17,7 +17,7 @@ function select($result, $connection2 = null, $orgtables = array(), $limit = 0)
odd(''); // reset odd for each result odd(''); // reset odd for each result
for ($i=0; (!$limit || $i < $limit) && ($row = $result->fetch_row()); $i++) { for ($i=0; (!$limit || $i < $limit) && ($row = $result->fetch_row()); $i++) {
if (!$i) { if (!$i) {
echo "<div style='overflow-x: auto;'>\n"; echo "<div class='scrollable'>\n";
echo "<table cellspacing='0' class='nowrap'>\n"; echo "<table cellspacing='0' class='nowrap'>\n";
echo "<thead><tr>"; echo "<thead><tr>";
for ($j=0; $j < count($row); $j++) { for ($j=0; $j < count($row); $j++) {

View file

@ -94,7 +94,7 @@ if (!$row) {
?> ?>
<form action="" method="post"> <form action="" method="post">
<div style="overflow-x: auto;"> <div class="scrollable">
<table cellspacing="0" class="nowrap"> <table cellspacing="0" class="nowrap">
<thead><tr> <thead><tr>
<th id="label-type"><?php echo lang('Index Type'); ?> <th id="label-type"><?php echo lang('Index Type'); ?>

View file

@ -38,7 +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"> <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" : ""); ?> <?php echo ($routine_languages ? lang('Language') . ": " . html_select("language", $routine_languages, $row["language"]) . "\n" : ""); ?>
<input type="submit" value="<?php echo lang('Save'); ?>"> <input type="submit" value="<?php echo lang('Save'); ?>">
<div style="overflow-x: auto;"> <div class="scrollable">
<table cellspacing="0" class="nowrap"> <table cellspacing="0" class="nowrap">
<?php <?php
edit_fields($row["fields"], $collations, $routine); edit_fields($row["fields"], $collations, $routine);

View file

@ -13,7 +13,7 @@ page_header(lang('Process list'), $error);
?> ?>
<form action="" method="post"> <form action="" method="post">
<div style="overflow-x: auto;"> <div class="scrollable">
<table cellspacing="0" class="nowrap checkable"> <table cellspacing="0" class="nowrap checkable">
<?php <?php
echo script("mixin(qsl('table'), {onclick: tableClick, ondblclick: partialArg(tableClick, true)});"); echo script("mixin(qsl('table'), {onclick: tableClick, ondblclick: partialArg(tableClick, true)});");

View file

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

View file

@ -32,6 +32,7 @@ input.wayoff { left: -1000px; position: absolute; }
.version { color: #777; font-size: 67%; } .version { color: #777; font-size: 67%; }
.js .hidden, .nojs .jsonly { display: none; } .js .hidden, .nojs .jsonly { display: none; }
.js .column { position: absolute; background: #ddf; padding: .27em 1ex .3em 0; margin-top: -.27em; } .js .column { position: absolute; background: #ddf; padding: .27em 1ex .3em 0; margin-top: -.27em; }
.scrollable { overflow-x: auto; }
.nowrap td, .nowrap th, td.nowrap, p.nowrap { white-space: pre; } .nowrap td, .nowrap th, td.nowrap, p.nowrap { white-space: pre; }
.wrap td { white-space: normal; } .wrap td { white-space: normal; }
.error { color: red; background: #fee; } .error { color: red; background: #fee; }

View file

@ -8,6 +8,7 @@ Avoid overwriting existing tables when copying tables (bug #642)
Fix function change with set data type Fix function change with set data type
Increase username maxlength to 80 (bug #623) Increase username maxlength to 80 (bug #623)
Make maxlength in all fields a soft limit Make maxlength in all fields a soft limit
Make tables horizontally scrollable
MySQL: Support foreign keys created with ANSI quotes (bug #620) MySQL: Support foreign keys created with ANSI quotes (bug #620)
MySQL: Recognize ON UPDATE current_timestamp() (bug #632, bug #638) MySQL: Recognize ON UPDATE current_timestamp() (bug #632, bug #638)
MySQL: Descending indexes in MySQL 8 (bug #643) MySQL: Descending indexes in MySQL 8 (bug #643)

View file

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

View file

@ -13,7 +13,7 @@ class AdminerTableStructure {
* @return bool * @return bool
*/ */
function tableStructurePrint($fields) { function tableStructurePrint($fields) {
echo "<div style='overflow-x: auto;'>\n"; echo "<div class='scrollable'>\n";
echo "<table cellspacing='0' class='nowrap'>\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"; 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) { foreach ($fields as $field) {