Commit 60795f30 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

at least with Firefox 3, onkeypress seems to send form too early if we choose...

at least with Firefox 3, onkeypress seems to send form too early if we choose something from field's history and then hit enter key.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@26675 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c375ab46
...@@ -126,7 +126,7 @@ ...@@ -126,7 +126,7 @@
<fieldset id="fieldset-tiosearch">\n <fieldset id="fieldset-tiosearch">\n
<input type="hidden" name="all_languages" value="1" />\n <input type="hidden" name="all_languages" value="1" />\n
<input accesskey="4" type="text" size="40" name="field_your_search_text" class="input-text" \n <input accesskey="4" type="text" size="40" name="field_your_search_text" class="input-text" \n
onkeypress="submitFormOnEnter(event, this.form, \'ERP5Site_viewQuickSearchResultList\');" />\n onkeyup="submitFormOnEnter(event, this.form, \'ERP5Site_viewQuickSearchResultList\');" />\n
<input type="submit" class="input-submit" value="" alt="Search"\n <input type="submit" class="input-submit" value="" alt="Search"\n
name="ERP5Site_viewQuickSearchResultList:method"/> \n name="ERP5Site_viewQuickSearchResultList:method"/> \n
</fieldset>\n </fieldset>\n
......
35 36
\ No newline at end of file \ No newline at end of file
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
tal:define="dummy python: request.RESPONSE.setHeader(\'Content-Type\', \n tal:define="dummy python: request.RESPONSE.setHeader(\'Content-Type\', \n
\'text/html;; charset=utf-8\');">\n \'text/html;; charset=utf-8\');">\n
<div>\n <div>\n
<input type="text" onkeypress="submitFormOnEnter(event, this.form, \'ERP5Site_processAdvancedSearch\');" class="input-text" name="top_your_search_text" size="40" accesskey="4"/>\n <input type="text" onkeyup="submitFormOnEnter(event, this.form, \'ERP5Site_processAdvancedSearch\');" class="input-text" name="top_your_search_text" size="40" accesskey="4"/>\n
<select size="1" class="input" name="top_your_search_portal_type">\n <select size="1" class="input" name="top_your_search_portal_type">\n
<option value="" selected="selected" i18n:translate="" i18n:domain="ui">Everything</option>\n <option value="" selected="selected" i18n:translate="" i18n:domain="ui">Everything</option>\n
<option value="all" i18n:translate="" i18n:domain="ui">All Documents</option>\n <option value="all" i18n:translate="" i18n:domain="ui">All Documents</option>\n
......
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
value="" \n value="" \n
tal:condition="python:here.getParamDict().has_key(\'your_search_text\')"\n tal:condition="python:here.getParamDict().has_key(\'your_search_text\')"\n
type="text"\n type="text"\n
onkeypress="submitFormOnEnter(event, \n onkeyup="submitFormOnEnter(event, \n
this.form,\n this.form,\n
\'ERP5Site_processAdvancedSearch\');"\n \'ERP5Site_processAdvancedSearch\');"\n
tal:attributes="value python:here.getParamDict()[\'your_search_text\']"/>\n tal:attributes="value python:here.getParamDict()[\'your_search_text\']"/>\n
...@@ -92,7 +92,7 @@ ...@@ -92,7 +92,7 @@
value="" \n value="" \n
tal:condition="python:not here.getParamDict().has_key(\'your_search_text\')"\n tal:condition="python:not here.getParamDict().has_key(\'your_search_text\')"\n
type="text"\n type="text"\n
onkeypress="submitFormOnEnter(event, \n onkeyup="submitFormOnEnter(event, \n
this.form,\n this.form,\n
\'ERP5Site_processAdvancedSearch\');">\n \'ERP5Site_processAdvancedSearch\');">\n
\n \n
...@@ -356,7 +356,7 @@ ...@@ -356,7 +356,7 @@
value=""\n value=""\n
tal:condition="python:here.getParamDict().has_key(\'your_search_text\')"\n tal:condition="python:here.getParamDict().has_key(\'your_search_text\')"\n
type="text" \n type="text" \n
onkeypress="submitFormOnEnter(event, \n onkeyup="submitFormOnEnter(event, \n
this.form,\n this.form,\n
\'ERP5Site_processAdvancedSearchBottom\');"\n \'ERP5Site_processAdvancedSearchBottom\');"\n
tal:attributes="value python:here.getParamDict()[\'your_search_text\']"/>\n tal:attributes="value python:here.getParamDict()[\'your_search_text\']"/>\n
...@@ -366,7 +366,7 @@ ...@@ -366,7 +366,7 @@
value=""\n value=""\n
tal:condition="python:not here.getParamDict().has_key(\'your_search_text\')"\n tal:condition="python:not here.getParamDict().has_key(\'your_search_text\')"\n
type="text"\n type="text"\n
onkeypress="submitFormOnEnter(event, \n onkeyup="submitFormOnEnter(event, \n
this.form,\n this.form,\n
\'ERP5Site_processAdvancedSearchBottom\');"/>\n \'ERP5Site_processAdvancedSearchBottom\');"/>\n
\n \n
...@@ -387,7 +387,7 @@ ...@@ -387,7 +387,7 @@
tal:condition="python: here.getParamDict().has_key(\'your_search_text\')"\n tal:condition="python: here.getParamDict().has_key(\'your_search_text\')"\n
type="text"\n type="text"\n
tal:attributes=\'value python:here.getParamDict()["your_search_text"];\n tal:attributes=\'value python:here.getParamDict()["your_search_text"];\n
onkeypress python:"if(event.keyCode==13){" + real_context.KnowledgePad_generateAjaxCall(context_url+"/"+form_id,box,box_id,params).replace("\\"this.value\\"","this.value")+ "return false;;}"\'/>\n onkeyup python:"if(event.keyCode==13){" + real_context.KnowledgePad_generateAjaxCall(context_url+"/"+form_id,box,box_id,params).replace("\\"this.value\\"","this.value")+ "return false;;}"\'/>\n
\n \n
\n \n
<input tal:define ="params python: {\'ERP5Site_processAdvancedSearchBottom:method\':\'\',\'bottom_your_search_text\':\'this.value\'};"\n <input tal:define ="params python: {\'ERP5Site_processAdvancedSearchBottom:method\':\'\',\'bottom_your_search_text\':\'this.value\'};"\n
...@@ -396,7 +396,7 @@ ...@@ -396,7 +396,7 @@
value=""\n value=""\n
tal:condition="python:not here.getParamDict().has_key(\'your_search_text\')"\n tal:condition="python:not here.getParamDict().has_key(\'your_search_text\')"\n
type="text"\n type="text"\n
tal:attributes=\'onkeypress python:"if(event.keyCode==13){" + real_context.KnowledgePad_generateAjaxCall(context_url+"/"+form_id,box,box_id,params).replace("\\"this.value\\"","this.value")+ "return false;;}"\'/>\n tal:attributes=\'onkeyup python:"if(event.keyCode==13){" + real_context.KnowledgePad_generateAjaxCall(context_url+"/"+form_id,box,box_id,params).replace("\\"this.value\\"","this.value")+ "return false;;}"\'/>\n
\n \n
</div>\n </div>\n
\n \n
......
...@@ -143,7 +143,7 @@ ...@@ -143,7 +143,7 @@
name string:${field_id}_page_start;\n name string:${field_id}_page_start;\n
value python:here.current_page + 1;\n value python:here.current_page + 1;\n
size python:len(str(here.total_pages));\n size python:len(str(here.total_pages));\n
onkeypress string:submitFormOnEnter(event, this.form, \'${field_id}_setPage\')" />\n onkeyup string:submitFormOnEnter(event, this.form, \'${field_id}_setPage\')" />\n
/ <tal:block content="here/total_pages" />\n / <tal:block content="here/total_pages" />\n
</td>\n </td>\n
<td style="white-space: nowrap; vertical-align: middle; text-align: center">\n <td style="white-space: nowrap; vertical-align: middle; text-align: center">\n
...@@ -325,7 +325,7 @@ ...@@ -325,7 +325,7 @@
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
tal:attributes=\'value python: selection.getParams().get(alias,"");\n tal:attributes=\'value python: selection.getParams().get(alias,"");\n
onkeypress python:"if(event.keyCode==13){" + real_context.KnowledgePad_generateAjaxCall(context_url+"/"+form_id,box_relative_url,box_id,params).replace("\\"this.value\\"","this.value")+ "return false;;}"\'/>\n onkeyup python:"if(event.keyCode==13){" + real_context.KnowledgePad_generateAjaxCall(context_url+"/"+form_id,box_relative_url,box_id,params).replace("\\"this.value\\"","this.value")+ "return false;;}"\'/>\n
</tal:block>\n </tal:block>\n
</span>\n </span>\n
</td>\n </td>\n
......
...@@ -285,7 +285,7 @@ ...@@ -285,7 +285,7 @@
size="8"\n size="8"\n
type="textarea" \n type="textarea" \n
tal:attributes=\'value python: selection.getParams().get(alias,"");\n tal:attributes=\'value python: selection.getParams().get(alias,"");\n
onkeypress python:"if(event.keyCode==13){" + real_context.KnowledgePad_generateAjaxCall(context_url+"/"+form_id,box,dom_id,params).replace("\\"this.value\\"","this.value")+ "return false;;}"\'/>\n onkeyup python:"if(event.keyCode==13){" + real_context.KnowledgePad_generateAjaxCall(context_url+"/"+form_id,box,dom_id,params).replace("\\"this.value\\"","this.value")+ "return false;;}"\'/>\n
\n \n
</tal:block>\n </tal:block>\n
</td>\n </td>\n
...@@ -429,7 +429,7 @@ ...@@ -429,7 +429,7 @@
tal:condition="python:not is_gadget_mode and show_search_line and here.getParamDict().has_key(\'advanced_search_text\')">\n tal:condition="python:not is_gadget_mode and show_search_line and here.getParamDict().has_key(\'advanced_search_text\')">\n
<input name="advanced_search_text" size="40" value=""\n <input name="advanced_search_text" size="40" value=""\n
type="text" tal:attributes="value python:here.getParamDict()[\'advanced_search_text\']"\n type="text" tal:attributes="value python:here.getParamDict()[\'advanced_search_text\']"\n
onkeypress="submitFormOnEnter(event,\n onkeyup="submitFormOnEnter(event,\n
this.form,\n this.form,\n
\'ERP5Site_processAdvancedSearch\');"/>\n \'ERP5Site_processAdvancedSearch\');"/>\n
<input class="button" value="Search" name="ERP5Site_processAdvancedSearch:method" type="submit" />\n <input class="button" value="Search" name="ERP5Site_processAdvancedSearch:method" type="submit" />\n
......
...@@ -122,7 +122,7 @@ ...@@ -122,7 +122,7 @@
<span id="search">\n <span id="search">\n
<input type="hidden" name="all_languages" value="1" />\n <input type="hidden" name="all_languages" value="1" />\n
<input accesskey="4" type="text" name="field_your_search_text" \n <input accesskey="4" type="text" name="field_your_search_text" \n
onkeypress="submitFormOnEnter(event, this.form, \'ERP5Site_viewQuickSearchResultList\');" />\n onkeyup="submitFormOnEnter(event, this.form, \'ERP5Site_viewQuickSearchResultList\');" />\n
<button type="submit" name="ERP5Site_viewQuickSearchResultList:method" title="Search"\n <button type="submit" name="ERP5Site_viewQuickSearchResultList:method" title="Search"\n
i18n:attributes="title" i18n:domain="ui">\n i18n:attributes="title" i18n:domain="ui">\n
<span class="image"></span>\n <span class="image"></span>\n
......
716 717
\ 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