Commit d9158244 authored by Ivan Tyagov's avatar Ivan Tyagov

Catch pressed Enter key and submit form for top,right fulltext search input field

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@21558 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 748a6b27
......@@ -188,7 +188,15 @@ function fixLeftRightHeightAndFocus(fix_height) {\n
}\n
autoFocus();\n
}\n
\n
// This function can be used to catch ENTER pressed in an input \n
// and modify respective main form action\n
function submitFormOnEnter(event, main_form_id, method_name){\n
var key_code = event.keyCode;\n
if(key_code == 13){\n
var main_form = getElement(main_form_id)\n
main_form.action=method_name;};\n
}
]]></string> </value>
</item>
......
......@@ -132,7 +132,10 @@
</span>\n
<span class="separator"><!--separator--></span>\n
<span id="search">\n
<input type="text" name="field_your_search_text" />\n
<input type="text" name="field_your_search_text" \n
onkeypress="submitFormOnEnter(event, \n
\'main_form\',\n
\'Base_searchResultList\');"/>\n
<button type="submit" name="Base_searchResultList:method" title="Search"\n
i18n:attributes="title" i18n:domain="ui">\n
<span class="image"></span>\n
......
2008-06-11 yo
* Append LOCALIZER_LANGUAGE=xxx to the redirected URL in Base_doLanguage. This is a hack to prevent false caching.
2008-06-12 ivan
* Catch pressed Enter key and submit form for top,right fulltext search input field
2008-06-09 kazuhiko
* Add icons for domain tree.
......
552
\ No newline at end of file
554
\ 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