Fix resetting search (bug #3612507)

This commit is contained in:
Jakub Vrana 2013-05-03 18:53:13 -07:00
parent 9c78b3bb34
commit 94a0cc8de8
4 changed files with 4 additions and 3 deletions

View file

@ -264,7 +264,7 @@ username.form['auth[driver]'].onchange();
if (!$val || ("$val[col]$val[val]" != "" && in_array($val["op"], $this->operators))) { 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 "<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 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"; echo "</div></fieldset>\n";

View file

@ -258,7 +258,7 @@ function selectAddRow(field) {
/** Clear column name after resetting search /** Clear column name after resetting search
* @param HTMLInputElement * @param HTMLInputElement
*/ */
function selectSearch(el) { function selectSearchSearch(el) {
if (!el.value) { if (!el.value) {
el.parentNode.firstChild.selectedIndex = 0; el.parentNode.firstChild.selectedIndex = 0;
} }

View file

@ -6,6 +6,7 @@ Allow using lang() in plugins (customization)
Remove bzip2 compression support Remove bzip2 compression support
Constraint memory used in TAR export Constraint memory used in TAR export
Allow exporting views dependent on each other (bug #3459151) Allow exporting views dependent on each other (bug #3459151)
Fix resetting search (bug #3612507)
MySQL: Optimize create table page and Editor navigation MySQL: Optimize create table page and Editor navigation
MySQL: Display bit type as binary number MySQL: Display bit type as binary number
MySQL: Improve export of binary data types MySQL: Improve export of binary data types

View file

@ -234,7 +234,7 @@ ORDER BY ORDINAL_POSITION", null, "") as $row) { //! requires MySQL 5
if (($val["col"] == "" || $columns[$val["col"]]) && "$val[col]$val[val]" != "") { 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 "<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 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++; $i++;
} }
} }