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

nobody at svn.erp5.org nobody at svn.erp5.org
Mon Mar 17 23:57:50 CET 2008


Author: fabien
Date: Mon Mar 17 23:57:49 2008
New Revision: 19978

URL: http://svn.erp5.org?rev=19978&view=rev
Log:
2008-03-18 fabien
* change the autoFocus() function of the erp5.js file to give the focus to the first text input of the view. This permit to have the focus on the title when create a new object.
* correct my last changelog, the date was not the good.

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/change_log
    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=19978&r1=19977&r2=19978&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 Mon Mar 17 23:57:49 2008
@@ -3,11 +3,8 @@
   <record id="1" aka="AAAAAAAAAAE=">
     <pickle>
       <tuple>
-        <tuple>
-          <string>OFS.DTMLMethod</string>
-          <string>DTMLMethod</string>
-        </tuple>
-        <none/>
+        <global name="DTMLMethod" module="OFS.DTMLMethod"/>
+        <tuple/>
       </tuple>
     </pickle>
     <pickle>
@@ -77,7 +74,10 @@
 \n
 \n
 // The first input element with an "autofocus" class will get the focus,\n
-// else, nothing done\n
+// else if no element have autofocus class, the first element wich is not the\n
+// search field will get the focus. This is generaly the title input text of\n
+// a view\n
+\n
 function autoFocus() {\n
   var inputs = document.getElementsByTagName("input");\n
   var input_to_focus = 0;\n
@@ -88,6 +88,13 @@
   }\n
   if (input_to_focus != 0) {\n
     input_to_focus.focus();\n
+  }else{\n
+    for ( var i=0; i<inputs.length; i++ ){\n
+      if (inputs[i].getAttribute("type") == "text" && inputs[i].getAttribute("name") != "field_your_search_text"){\n
+        inputs[i].focus();\n
+        break;\n
+      }\n
+    }\n
   }\n
 }\n
 \n
@@ -132,7 +139,8 @@
     fixLeftRightHeight();\n
   }\n
   autoFocus();\n
-}
+}\n
+
 
 ]]></string> </value>
         </item>

Modified: erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/change_log
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/change_log?rev=19978&r1=19977&r2=19978&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/change_log (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/change_log Mon Mar 17 23:57:49 2008
@@ -1,4 +1,7 @@
-2008-03-06 fabien
+2008-03-18 fabien
+* change the autoFocus() function of the erp5.js file to give the focus to the first text input of the view.
+
+2008-03-17 fabien
 * Add new selector for matrixbox style attribute wich were hardcoded (and not valid) before r19976.
 
 2008-03-06 jerome

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=19978&r1=19977&r2=19978&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/revision (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/revision Mon Mar 17 23:57:49 2008
@@ -1,1 +1,1 @@
-511
+514




More information about the Erp5-report mailing list