Commit 45aaec05 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

2010-06-10 kazuhiko

* Typing Enter key in listbox search fields invokes Base_doSelect instead of the page's form action.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@36228 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 14561e10
...@@ -233,7 +233,8 @@ ...@@ -233,7 +233,8 @@
tal:replace="structure python: search_field.render(value = param, key = alias)" />\n tal:replace="structure python: search_field.render(value = param, key = alias)" />\n
<tal:block tal:condition="python: search_field is None">\n <tal:block tal:condition="python: search_field is None">\n
<input tal:condition="not: is_gadget_mode" name="id" size="8" value=""\n <input tal:condition="not: is_gadget_mode" name="id" size="8" value=""\n
tal:attributes="name alias; value param" style="width: 100%" />\n tal:attributes="name alias; value param" style="width: 100%"\n
onkeypress="submitFormOnEnter(event, this.form, \'Base_doSelect\');" />\n
<input tal:condition="is_gadget_mode" \n <input tal:condition="is_gadget_mode" \n
tal:define ="params python: {alias:\'this.value\'};"\n tal:define ="params python: {alias:\'this.value\'};"\n
size="8" type="textarea" \n size="8" type="textarea" \n
......
...@@ -277,14 +277,19 @@ var addOnChangeEventHandler = function() {\n ...@@ -277,14 +277,19 @@ var addOnChangeEventHandler = function() {\n
if (nodes[j].nodeName == "DIV" && (\n if (nodes[j].nodeName == "DIV" && (\n
nodes[j].getAttribute("class") == "listbox" ||\n nodes[j].getAttribute("class") == "listbox" ||\n
nodes[j].getAttribute("class") == "MatrixContent")) {\n nodes[j].getAttribute("class") == "MatrixContent")) {\n
\n trs = nodes[j].getElementsByTagName(\'td\');\n
inputs = nodes[j].getElementsByTagName(\'input\');\n for (k=0; k<trs.length; k++){\n
for (k=0; k<inputs.length; k++){\n if (trs[k].getAttribute("class") == "listbox_search_line") {\n
if (inputs[k].getAttribute("type") != "hidden" &&\n continue;\n
!inputs[k].onchange) {\n }\n
inputs[k].onchange = function() { changed = true; };\n inputs = trs[k].getElementsByTagName(\'input\');\n
}\n for (l=0; l<inputs.length; l++){\n
}\n if (inputs[l].getAttribute("type") != "hidden" &&\n
!inputs[l].onchange) {\n
inputs[l].onchange = function() { changed = true; };\n
}\n
}\n
}\n
}\n }\n
}\n }\n
}\n }\n
......
2010-06-10 kazuhiko
* Typing Enter key in listbox search fields invokes Base_doSelect instead of the page's form action.
2010-05-28 yo 2010-05-28 yo
* Make it possible to customize the behavior after a new content is added. * Make it possible to customize the behavior after a new content is added.
......
949 950
\ No newline at end of file \ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment