Hide fieldsets in select
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@693 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
parent
b5fa22e0ab
commit
b142000d8b
|
@ -14,7 +14,6 @@ p { margin: 0 20px 1em 0; }
|
||||||
img { vertical-align: middle; border: 0; }
|
img { vertical-align: middle; border: 0; }
|
||||||
code { background: #eee; }
|
code { background: #eee; }
|
||||||
.js .hidden { display: none; }
|
.js .hidden { display: none; }
|
||||||
.popup { position: absolute; }
|
|
||||||
.nowrap { white-space: nowrap; }
|
.nowrap { white-space: nowrap; }
|
||||||
.wrap { white-space: normal; }
|
.wrap { white-space: normal; }
|
||||||
.error { color: red; background: #fee; padding: .5em .8em; }
|
.error { color: red; background: #fee; padding: .5em .8em; }
|
||||||
|
|
|
@ -6,14 +6,6 @@ function toggle(id) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function popup(el) {
|
|
||||||
el.getElementsByTagName('span')[0].className = 'popup';
|
|
||||||
}
|
|
||||||
|
|
||||||
function popdown(el) {
|
|
||||||
el.getElementsByTagName('span')[0].className = 'hidden';
|
|
||||||
}
|
|
||||||
|
|
||||||
function verify_version(version) {
|
function verify_version(version) {
|
||||||
document.cookie = 'adminer_version=0';
|
document.cookie = 'adminer_version=0';
|
||||||
var script = document.createElement('script');
|
var script = document.createElement('script');
|
||||||
|
|
|
@ -57,7 +57,7 @@ $translations = array(
|
||||||
'Select' => 'Vypsat',
|
'Select' => 'Vypsat',
|
||||||
'New item' => 'Nová položka',
|
'New item' => 'Nová položka',
|
||||||
'Search' => 'Vyhledat',
|
'Search' => 'Vyhledat',
|
||||||
'ASC' => 'vzestupně',
|
'Sort' => 'Setřídit',
|
||||||
'DESC' => 'sestupně',
|
'DESC' => 'sestupně',
|
||||||
'Limit' => 'Limit',
|
'Limit' => 'Limit',
|
||||||
'No rows.' => 'Žádné řádky.',
|
'No rows.' => 'Žádné řádky.',
|
||||||
|
|
|
@ -152,7 +152,7 @@ if (!$columns) {
|
||||||
echo "<p class='error'>" . lang('Unable to select the table') . ($fields ? "" : ": " . htmlspecialchars($dbh->error)) . ".</p>\n";
|
echo "<p class='error'>" . lang('Unable to select the table') . ($fields ? "" : ": " . htmlspecialchars($dbh->error)) . ".</p>\n";
|
||||||
} else {
|
} else {
|
||||||
echo "<form action='' id='form'>\n";
|
echo "<form action='' id='form'>\n";
|
||||||
echo "<fieldset><legend>" . lang('Select') . "</legend>\n";
|
echo '<fieldset><legend><a href="#fieldset-select" onclick="return !toggle(\'fieldset-select\');">' . lang('Select') . "</a></legend><div id='fieldset-select'" . ($select ? "" : " class='hidden'") . ">\n";
|
||||||
if (strlen($_GET["server"])) {
|
if (strlen($_GET["server"])) {
|
||||||
echo '<input type="hidden" name="server" value="' . htmlspecialchars($_GET["server"]) . '" />';
|
echo '<input type="hidden" name="server" value="' . htmlspecialchars($_GET["server"]) . '" />';
|
||||||
}
|
}
|
||||||
|
@ -169,9 +169,9 @@ if (!$columns) {
|
||||||
}
|
}
|
||||||
echo "<div><select name='columns[$i][fun]' onchange='this.nextSibling.onchange();'><option></option>" . optionlist($fun_group) . "</select>";
|
echo "<div><select name='columns[$i][fun]' onchange='this.nextSibling.onchange();'><option></option>" . optionlist($fun_group) . "</select>";
|
||||||
echo "<select name='columns[$i][col]' onchange='select_add_row(this);'><option></option>" . optionlist($columns) . "</select></div>\n";
|
echo "<select name='columns[$i][col]' onchange='select_add_row(this);'><option></option>" . optionlist($columns) . "</select></div>\n";
|
||||||
echo "</fieldset>\n";
|
echo "</div></fieldset>\n";
|
||||||
|
|
||||||
echo "<fieldset><legend>" . lang('Search') . "</legend>\n";
|
echo '<fieldset><legend><a href="#fieldset-search" onclick="return !toggle(\'fieldset-search\');">' . lang('Search') . "</a></legend><div id='fieldset-search'" . ($where ? "" : " class='hidden'") . ">\n";
|
||||||
foreach ($indexes as $i => $index) {
|
foreach ($indexes as $i => $index) {
|
||||||
if ($index["type"] == "FULLTEXT") {
|
if ($index["type"] == "FULLTEXT") {
|
||||||
echo "(<i>" . implode("</i>, <i>", array_map('htmlspecialchars', $index["columns"])) . "</i>) AGAINST";
|
echo "(<i>" . implode("</i>, <i>", array_map('htmlspecialchars', $index["columns"])) . "</i>) AGAINST";
|
||||||
|
@ -192,17 +192,34 @@ if (!$columns) {
|
||||||
echo "<div><select name='where[$i][col]' onchange='select_add_row(this);'><option value=''>" . lang('(anywhere)') . "</option>" . optionlist($columns) . "</select>";
|
echo "<div><select name='where[$i][col]' onchange='select_add_row(this);'><option value=''>" . lang('(anywhere)') . "</option>" . optionlist($columns) . "</select>";
|
||||||
echo "<select name='where[$i][op]' onchange='where_change(this);'>" . optionlist($operators) . "</select>";
|
echo "<select name='where[$i][op]' onchange='where_change(this);'>" . optionlist($operators) . "</select>";
|
||||||
echo "<input name='where[$i][val]' /></div>\n";
|
echo "<input name='where[$i][val]' /></div>\n";
|
||||||
echo "</fieldset>\n";
|
echo "</div></fieldset>\n";
|
||||||
|
|
||||||
|
echo '<fieldset><legend><a href="#fieldset-sort" onclick="return !toggle(\'fieldset-sort\');">' . lang('Sort') . "</a></legend><div id='fieldset-sort'" . (count($order) > 1 ? "" : " class='hidden'") . ">\n";
|
||||||
|
$i = 0;
|
||||||
|
foreach ((array) $_GET["order"] as $key => $val) {
|
||||||
|
if (in_array($val, $columns, true)) {
|
||||||
|
echo "<div><select name='order[$i]'><option></option>" . optionlist($columns, $val) . "</select>";
|
||||||
|
echo "<label><input type='checkbox' name='desc[$i]' value='1'" . (isset($_GET["desc"][$key]) ? " checked='checked'" : "") . " />" . lang('DESC') . "</label></div>\n";
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo "<div><select name='order[$i]' onchange='select_add_row(this);'><option></option>" . optionlist($columns) . "</select>";
|
||||||
|
echo "<label><input type='checkbox' name='desc[$i]' value='1' />" . lang('DESC') . "</label></div>\n";
|
||||||
|
echo "</div></fieldset>\n";
|
||||||
|
|
||||||
echo "<fieldset><legend>" . lang('Limit') . "</legend><div>";
|
echo "<fieldset><legend>" . lang('Limit') . "</legend><div>";
|
||||||
echo hidden_fields(array("order" => (array) $_GET["order"], "desc" => (array) $_GET["desc"]));
|
echo "<input name='limit' size='3' value=\"" . htmlspecialchars($limit) . "\" />";
|
||||||
echo "<input name='limit' size='3' value=\"" . htmlspecialchars($limit) . "\" /></div></fieldset>\n";
|
echo "</div></fieldset>\n";
|
||||||
|
|
||||||
if (isset($text_length)) {
|
if (isset($text_length)) {
|
||||||
echo "<fieldset><legend>" . lang('Text length') . "</legend><div><input name='text_length' size='3' value=\"" . htmlspecialchars($text_length) . "\" /></div></fieldset>\n";
|
echo "<fieldset><legend>" . lang('Text length') . "</legend><div>";
|
||||||
|
echo "<input name='text_length' size='3' value=\"" . htmlspecialchars($text_length) . "\" />";
|
||||||
|
echo "</div></fieldset>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "<fieldset><legend>" . lang('Action') . "</legend><div><input type='submit' value='" . lang('Select') . "' /></div></fieldset>\n";
|
echo "<fieldset><legend>" . lang('Action') . "</legend><div>";
|
||||||
|
echo "<input type='submit' value='" . lang('Select') . "' />";
|
||||||
|
echo "</div></fieldset>\n";
|
||||||
echo "</form>\n";
|
echo "</form>\n";
|
||||||
|
|
||||||
$query = "SELECT " . ($select ? (count($group) < count($select) ? "SQL_CALC_FOUND_ROWS " : "") . implode(", ", $select) : "*") . " $from";
|
$query = "SELECT " . ($select ? (count($group) < count($select) ? "SQL_CALC_FOUND_ROWS " : "") . implode(", ", $select) : "*") . " $from";
|
||||||
|
@ -228,17 +245,7 @@ if (!$columns) {
|
||||||
if (!$j) {
|
if (!$j) {
|
||||||
echo '<thead><tr><td><input type="checkbox" id="all-page" onclick="form_check(this, /check/);" /></td>';
|
echo '<thead><tr><td><input type="checkbox" id="all-page" onclick="form_check(this, /check/);" /></td>';
|
||||||
foreach ($row as $key => $val) {
|
foreach ($row as $key => $val) {
|
||||||
$pos = array_search($key, (array) $_GET["order"]);
|
echo '<th><a href="' . htmlspecialchars(remove_from_uri('(order|desc)[^=]*') . '&order%5B0%5D=' . urlencode($key) . ($_GET["order"] == array($key) && !$_GET["desc"][0] ? '&desc%5B0%5D=1' : '')) . '">' . htmlspecialchars($key) . '</a></th>';
|
||||||
$uri = remove_from_uri($pos !== false ? "(order|desc)%5B$pos%5D" : "");
|
|
||||||
$pos2 = 0;
|
|
||||||
if ($_GET["order"]) {
|
|
||||||
$pos2 = max(array_keys($_GET["order"]));
|
|
||||||
$pos2 += ($pos2 !== $pos ? 1 : 0);
|
|
||||||
}
|
|
||||||
echo '<th onmouseover="popup(this);" onmouseout="popdown(this);"><a href="' . htmlspecialchars(remove_from_uri('(order|desc)[^=]*') . '&order%5B0%5D=' . urlencode($key) . ($_GET["order"] == array($key) && !$_GET["desc"][0] ? '&desc%5B0%5D=1' : '')) . '">' . htmlspecialchars($key) . '</a><span class="hidden">';
|
|
||||||
echo '<a href="' . htmlspecialchars("$uri&order%5B$pos2%5D=" . urlencode($key)) . "\"><img src='up.gif' alt='^' title='" . lang('ASC') . "' /></a>";
|
|
||||||
echo '<a href="' . htmlspecialchars("$uri&order%5B$pos2%5D=" . urlencode($key) . "&desc%5B$pos2%5D=1") . "\"><img src='down.gif' alt='v' title='" . lang('DESC') . "' /></a>";
|
|
||||||
echo '</span></th>';
|
|
||||||
}
|
}
|
||||||
echo "</tr></thead>\n";
|
echo "</tr></thead>\n";
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@ All privileges in user rights
|
||||||
Fix FOUND_ROWS() in SQL command
|
Fix FOUND_ROWS() in SQL command
|
||||||
Export only selected columns in select
|
Export only selected columns in select
|
||||||
Include views in drop and move on database overview
|
Include views in drop and move on database overview
|
||||||
Simplify order in select
|
Hide fieldsets in select
|
||||||
Use \n in SQL commands
|
Use \n in SQL commands
|
||||||
|
|
||||||
phpMinAdmin 1.10.1:
|
phpMinAdmin 1.10.1:
|
||||||
|
|
Loading…
Reference in a new issue