[Erp5-report] r20051 - in /erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style: SkinTemplat...

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Mar 19 17:12:20 CET 2008


Author: fabien
Date: Wed Mar 19 17:12:12 2008
New Revision: 20051

URL: http://svn.erp5.org?rev=20051&view=rev
Log:
test if text input exists before give it the focus. This prevent the javascipt to crash when no text input are found on the page.

Modified:
    erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/erp5.js.xml
    erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/revision

Modified: erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/erp5.js.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/erp5.js.xml?rev=20051&r1=20050&r2=20051&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/erp5.js.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/erp5.js.xml Wed Mar 19 17:12:12 2008
@@ -87,7 +87,9 @@
   }else{\n
     var first_text_input_expr = ".//input[@type=\'text\'][@name != \'field_your_search_text\']"\n
     var first_text_input = document.evaluate(first_text_input_expr, document, null, FIRST_RESULT, null).singleNodeValue;\n
-    first_text_input.focus();\n
+    if (first_text_input){\n
+      first_text_input.focus();\n
+    }\n
   }\n
 }\n
 \n

Modified: erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/revision
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/revision?rev=20051&r1=20050&r2=20051&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/revision (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/revision Wed Mar 19 17:12:12 2008
@@ -1,1 +1,1 @@
-516
+517




More information about the Erp5-report mailing list