From 896ce661ccf54e3ef56c68dfd6c5a7a06c84fa6e Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Sat, 10 Mar 2012 15:37:21 +0000 Subject: [PATCH] IE workaround for filter boxes --- lam/lib/lists.inc | 4 ++-- lam/templates/lib/500_lam.js | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/lam/lib/lists.inc b/lam/lib/lists.inc index 85862665..c7a8dc01 100644 --- a/lam/lib/lists.inc +++ b/lam/lib/lists.inc @@ -341,7 +341,7 @@ class lamList { printHelpLink(getHelp('', '250'), '250'); echo "\n"; echo ""; - echo ""; + echo ""; echo "\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 ""; - echo "attrArray[$k]) ."\"" . $value . " onkeypress=\"SubmitForm('apply_filter', event)\">"; + echo "attrArray[$k]) ."\"" . $value . " onkeypress=\"SubmitForm('apply_filter', event);\">"; echo "\n"; } echo "\n"; diff --git a/lam/templates/lib/500_lam.js b/lam/templates/lib/500_lam.js index b3f58572..c8e4f6af 100644 --- a/lam/templates/lib/500_lam.js +++ b/lam/templates/lib/500_lam.js @@ -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) {