Move whitespace to CSS
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1189 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
parent
32d5b9ccb6
commit
50881f8942
|
@ -56,7 +56,7 @@ function select($result, $connection2 = null) {
|
||||||
} elseif (!strlen($val)) {
|
} elseif (!strlen($val)) {
|
||||||
$val = " "; // some content to print a border
|
$val = " "; // some content to print a border
|
||||||
} else {
|
} else {
|
||||||
$val = whitespace(h($val));
|
$val = h($val);
|
||||||
if ($types[$key] == 254) {
|
if ($types[$key] == 254) {
|
||||||
$val = "<code>$val</code>";
|
$val = "<code>$val</code>";
|
||||||
}
|
}
|
||||||
|
@ -188,7 +188,7 @@ if ($type == "PROCEDURE") {
|
||||||
echo " <input type='image' name='drop_col[$i]' src='../adminer/static/cross.gif' alt='x' title='" . lang('Remove') . "' onclick='return !editing_remove_row(this);'>";
|
echo " <input type='image' name='drop_col[$i]' src='../adminer/static/cross.gif' alt='x' title='" . lang('Remove') . "' onclick='return !editing_remove_row(this);'>";
|
||||||
echo " <input type='image' name='up[$i]' src='../adminer/static/up.gif' alt='^' title='" . lang('Move up') . "'>";
|
echo " <input type='image' name='up[$i]' src='../adminer/static/up.gif' alt='^' title='" . lang('Move up') . "'>";
|
||||||
echo " <input type='image' name='down[$i]' src='../adminer/static/down.gif' alt='v' title='" . lang('Move down') . "'>";
|
echo " <input type='image' name='down[$i]' src='../adminer/static/down.gif' alt='v' title='" . lang('Move down') . "'>";
|
||||||
echo "\n\n";
|
echo "\n";
|
||||||
}
|
}
|
||||||
return $column_comments;
|
return $column_comments;
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,14 +43,6 @@ function h($string) {
|
||||||
return htmlspecialchars($string, ENT_QUOTES);
|
return htmlspecialchars($string, ENT_QUOTES);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Convert text whitespace to HTML
|
|
||||||
* @param string
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
function whitespace($string) {
|
|
||||||
return nl2br(preg_replace('~(^| ) ~m', '\\1 ', str_replace("\t", " ", $string)));
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Escape for TD
|
/** Escape for TD
|
||||||
* @param string
|
* @param string
|
||||||
* @return string
|
* @return string
|
||||||
|
|
|
@ -212,9 +212,9 @@ if (!$columns) {
|
||||||
if (!strlen($val)) {
|
if (!strlen($val)) {
|
||||||
$val = " ";
|
$val = " ";
|
||||||
} elseif (strlen($text_length) && ereg('text|blob', $field["type"]) && is_utf8($val)) {
|
} elseif (strlen($text_length) && ereg('text|blob', $field["type"]) && is_utf8($val)) {
|
||||||
$val = whitespace(shorten_utf8($val, max(0, intval($text_length)))); // usage of LEFT() would reduce traffic but complicate query
|
$val = shorten_utf8($val, max(0, intval($text_length))); // usage of LEFT() would reduce traffic but complicate query
|
||||||
} else {
|
} else {
|
||||||
$val = whitespace(h($val));
|
$val = h($val);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$link) { // link related items
|
if (!$link) { // link related items
|
||||||
|
|
|
@ -18,7 +18,7 @@ code { background: #eee; }
|
||||||
tr:hover td, tr:hover th { background: #ddf; }
|
tr:hover td, tr:hover th { background: #ddf; }
|
||||||
.version { color: #777; font-size: 67%; }
|
.version { color: #777; font-size: 67%; }
|
||||||
.js .hidden { display: none; }
|
.js .hidden { display: none; }
|
||||||
.nowrap { white-space: nowrap; }
|
.nowrap { white-space: pre; }
|
||||||
.wrap { white-space: normal; }
|
.wrap { white-space: normal; }
|
||||||
.error { color: red; background: #fee; }
|
.error { color: red; background: #fee; }
|
||||||
.message { color: green; background: #efe; }
|
.message { color: green; background: #efe; }
|
||||||
|
|
Loading…
Reference in a new issue