Skip to content
Browse files

Fix resetting search (bug #3612507)

  • Loading branch information...
1 parent 9c78b3b commit 94a0cc8de8d432b1e6a2abce1759e3bbf0661d58 @vrana committed
Showing with 4 additions and 3 deletions.
  1. +1 −1 adminer/include/adminer.inc.php
  2. +1 −1 adminer/static/functions.js
  3. +1 −0 changes.txt
  4. +1 −1 editor/include/adminer.inc.php
View
2 adminer/include/adminer.inc.php
@@ -264,7 +264,7 @@ function selectSearchPrint($where, $columns, $indexes) {
if (!$val || ("$val[col]$val[val]" != "" && in_array($val["op"], $this->operators))) {
echo "<div><select name='where[$i][col]' onchange='$change_next'><option value=''>(" . lang('anywhere') . ")" . optionlist($columns, $val["col"], true) . "</select>";
echo html_select("where[$i][op]", $this->operators, $val["op"], $change_next);
- echo "<input type='search' name='where[$i][val]' value='" . h($val["val"]) . "' onchange='" . ($val ? "selectFieldChange(this.form)" : "selectAddRow(this)") . ";' onsearch='selectSearch(this);'></div>\n";
+ echo "<input type='search' name='where[$i][val]' value='" . h($val["val"]) . "' onchange='" . ($val ? "selectFieldChange(this.form)" : "selectAddRow(this)") . ";' onsearch='selectSearchSearch(this);'></div>\n";
}
}
echo "</div></fieldset>\n";
View
2 adminer/static/functions.js
@@ -258,7 +258,7 @@ function selectAddRow(field) {
/** Clear column name after resetting search
* @param HTMLInputElement
*/
-function selectSearch(el) {
+function selectSearchSearch(el) {
if (!el.value) {
el.parentNode.firstChild.selectedIndex = 0;
}
View
1 changes.txt
@@ -6,6 +6,7 @@ Allow using lang() in plugins (customization)
Remove bzip2 compression support
Constraint memory used in TAR export
Allow exporting views dependent on each other (bug #3459151)
+Fix resetting search (bug #3612507)
MySQL: Optimize create table page and Editor navigation
MySQL: Display bit type as binary number
MySQL: Improve export of binary data types
View
2 editor/include/adminer.inc.php
@@ -234,7 +234,7 @@ function selectSearchPrint($where, $columns, $indexes) {
if (($val["col"] == "" || $columns[$val["col"]]) && "$val[col]$val[val]" != "") {
echo "<div><select name='where[$i][col]'><option value=''>(" . lang('anywhere') . ")" . optionlist($columns, $val["col"], true) . "</select>";
echo html_select("where[$i][op]", array(-1 => "") + $this->operators, $val["op"]);
- echo "<input type='search' name='where[$i][val]' value='" . h($val["val"]) . "' onsearch='selectSearch(this);'></div>\n";
+ echo "<input type='search' name='where[$i][val]' value='" . h($val["val"]) . "' onsearch='selectSearchSearch(this);'></div>\n";
$i++;
}
}

0 comments on commit 94a0cc8

Please sign in to comment.
Something went wrong with that request. Please try again.