IE workaround for filter boxes

This commit is contained in:
Roland Gruber 2012-03-10 15:37:21 +00:00
parent f3af528a13
commit 896ce661cc
2 changed files with 9 additions and 2 deletions

View File

@ -341,7 +341,7 @@ class lamList {
printHelpLink(getHelp('', '250'), '250');
echo "</td>\n";
echo "<td>";
echo "<button class=\"smallPadding\" id=\"filterButton\" name=\"apply_filter\">" . _("Filter") . "</button>";
echo "<button type=\"submit\" class=\"smallPadding\" id=\"apply_filter\" name=\"apply_filter\">" . _("Filter") . "</button>";
echo "</td>\n";
// print input boxes for filters
for ($k = 0; $k < sizeof ($this->descArray); $k++) {
@ -353,7 +353,7 @@ class lamList {
$value = " value=\"" . $_POST["filter" . strtolower($this->attrArray[$k])] . "\"";
}
echo "<td align=\"left\">";
echo "<input style=\"margin-right: 10px;\" type=\"text\" size=15 name=\"filter" . strtolower ($this->attrArray[$k]) ."\"" . $value . " onkeypress=\"SubmitForm('apply_filter', event)\">";
echo "<input style=\"margin-right: 10px;\" type=\"text\" size=15 name=\"filter" . strtolower ($this->attrArray[$k]) ."\"" . $value . " onkeypress=\"SubmitForm('apply_filter', event);\">";
echo "</td>\n";
}
echo "</tr></thead>\n";

View File

@ -103,9 +103,16 @@ function listShowSettingsDialog(title, okText, cancelText) {
function SubmitForm(id, e) {
if (e.keyCode == 13) {
if (e.preventDefault) {
e.preventDefault();
}
if (e.returnValue) {
e.returnValue = false;
}
document.getElementsByName(id)[0].click();
return false;
}
return true;
}
function addResizeHandler(item, min, max) {