Commit 7b05c961 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

revert r.26675 partially.

* use onkeypress event instead of onkeyup for AJAX call, otherwise both AJAX call and form submit will be invoked.
* but still use onkeyup event for non-AJAX field because firefox will sent 'only typed characters' even when a user select an element from the form history.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@26787 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 66576d10
...@@ -343,7 +343,7 @@ ...@@ -343,7 +343,7 @@
<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
name="bottom_your_search_text" size="25" value="" type="text"\n name="bottom_your_search_text" size="25" value="" type="text"\n
tal:attributes=\'value your_search_text;\n tal:attributes=\'value your_search_text;\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 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
</div>\n </div>\n
\n \n
</div>\n </div>\n
......
...@@ -280,7 +280,7 @@ ...@@ -280,7 +280,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
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 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
</tal:block>\n </tal:block>\n
</span>\n </span>\n
</td>\n </td>\n
......
...@@ -281,7 +281,7 @@ ...@@ -281,7 +281,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
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 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
\n \n
</tal:block>\n </tal:block>\n
</td>\n </td>\n
......
738 739
\ 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