Links for column search in select
This commit is contained in:
parent
e8b95f127f
commit
e2dbb9c7bd
|
@ -273,10 +273,12 @@ if (!$columns) {
|
||||||
if ($name != "") {
|
if ($name != "") {
|
||||||
$rank++;
|
$rank++;
|
||||||
$names[$key] = $name;
|
$names[$key] = $name;
|
||||||
$column = idf_escape($key);
|
|
||||||
$href = remove_from_uri('(order|desc)[^=]*|page') . '&order%5B0%5D=' . urlencode($key);
|
$href = remove_from_uri('(order|desc)[^=]*|page') . '&order%5B0%5D=' . urlencode($key);
|
||||||
echo '<th><a href="' . h($href) . '">' . (!$select || $val ? apply_sql_function($val["fun"], $name) : h(current($select))) . "</a>"; //! columns looking like functions
|
echo '<th><a href="' . h($href) . '">' . (!$select || $val ? apply_sql_function($val["fun"], $name) : h(current($select))) . "</a>"; //! columns looking like functions
|
||||||
echo "<a href='" . h("$href&desc%5B0%5D=1") . "' title='" . lang('descending') . "' class='text'> ↓</a>";
|
echo "<a href='" . h("$href&desc%5B0%5D=1") . "' title='" . lang('descending') . "' class='text'> ↓</a>";
|
||||||
|
if (!$val["fun"]) {
|
||||||
|
echo '<a href="#fieldset-search" onclick="selectSearch(\'' . h(js_escape($key)) . '\'); return false;" title="' . lang('Search') . '" class="text jsonly"> =</a>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$functions[$key] = $val["fun"];
|
$functions[$key] = $val["fun"];
|
||||||
next($select);
|
next($select);
|
||||||
|
|
|
@ -262,6 +262,28 @@ function selectFieldChange(form) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/** Fill column in search field
|
||||||
|
* @param string
|
||||||
|
*/
|
||||||
|
function selectSearch(name) {
|
||||||
|
var el = document.getElementById('fieldset-search');
|
||||||
|
el.className = '';
|
||||||
|
var divs = el.getElementsByTagName('div');
|
||||||
|
for (var i=0; i < divs.length; i++) {
|
||||||
|
var div = divs[i];
|
||||||
|
if (selectValue(div.firstChild) == name) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (i == divs.length) {
|
||||||
|
div.firstChild.value = name;
|
||||||
|
div.firstChild.onchange();
|
||||||
|
}
|
||||||
|
div.lastChild.focus();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/** Send form by Ctrl+Enter on <select> and <textarea>
|
/** Send form by Ctrl+Enter on <select> and <textarea>
|
||||||
* @param KeyboardEvent
|
* @param KeyboardEvent
|
||||||
* @param [string]
|
* @param [string]
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
Adminer 3.4.1-dev:
|
Adminer 3.4.1-dev:
|
||||||
|
Links for column search in select
|
||||||
Display assigned auto_increment after clone
|
Display assigned auto_increment after clone
|
||||||
SQLite: Full alter table
|
SQLite: Full alter table
|
||||||
SQLite: Better editing in tables without primary key
|
SQLite: Better editing in tables without primary key
|
||||||
|
|
Loading…
Reference in a new issue