Fix select function onchange
This commit is contained in:
parent
ef3b468626
commit
6d14b47d02
|
@ -322,7 +322,7 @@ class Adminer {
|
||||||
echo "<div>" . ($functions || $grouping ? "<select name='columns[$i][fun]'>"
|
echo "<div>" . ($functions || $grouping ? "<select name='columns[$i][fun]'>"
|
||||||
. optionlist(array(-1 => "") + array_filter(array(lang('Functions') => $functions, lang('Aggregation') => $grouping)), $val["fun"]) . "</select>"
|
. optionlist(array(-1 => "") + array_filter(array(lang('Functions') => $functions, lang('Aggregation') => $grouping)), $val["fun"]) . "</select>"
|
||||||
. on_help("getTarget(event).value && getTarget(event).value.replace(/ |\$/, '(') + ')'", 1)
|
. on_help("getTarget(event).value && getTarget(event).value.replace(/ |\$/, '(') + ')'", 1)
|
||||||
. script("qsl('select').onchange = function () { helpClose();" . ($key !== "" ? "" : " this.nextSibling.nextSibling.nextSibling.onchange();") . " };", "")
|
. script("qsl('select').onchange = function () { helpClose();" . ($key !== "" ? "" : " qsl('select, input', this.parentNode).onchange();") . " };", "")
|
||||||
. "($column)" : $column) . "</div>\n";
|
. "($column)" : $column) . "</div>\n";
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,10 +9,11 @@ function qs(selector) {
|
||||||
|
|
||||||
/** Get last element by selector
|
/** Get last element by selector
|
||||||
* @param string
|
* @param string
|
||||||
|
* @param [HTMLElement] defaults to document
|
||||||
* @return HTMLElement
|
* @return HTMLElement
|
||||||
*/
|
*/
|
||||||
function qsl(selector) {
|
function qsl(selector, context) {
|
||||||
var els = qsa(selector, document);
|
var els = qsa(selector, context || document);
|
||||||
return els[els.length - 1];
|
return els[els.length - 1];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue