Commit f8cdb3ae authored by Fabien Morin's avatar Fabien Morin

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.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@19978 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 19ed76b1
...@@ -3,11 +3,8 @@ ...@@ -3,11 +3,8 @@
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple> <tuple>
<tuple> <global name="DTMLMethod" module="OFS.DTMLMethod"/>
<string>OFS.DTMLMethod</string> <tuple/>
<string>DTMLMethod</string>
</tuple>
<none/>
</tuple> </tuple>
</pickle> </pickle>
<pickle> <pickle>
...@@ -77,7 +74,10 @@ function clickSaveButton(act) {\n ...@@ -77,7 +74,10 @@ function clickSaveButton(act) {\n
\n \n
\n \n
// The first input element with an "autofocus" class will get the focus,\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 function autoFocus() {\n
var inputs = document.getElementsByTagName("input");\n var inputs = document.getElementsByTagName("input");\n
var input_to_focus = 0;\n var input_to_focus = 0;\n
...@@ -88,6 +88,13 @@ function autoFocus() {\n ...@@ -88,6 +88,13 @@ function autoFocus() {\n
}\n }\n
if (input_to_focus != 0) {\n if (input_to_focus != 0) {\n
input_to_focus.focus();\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 }\n
\n \n
...@@ -132,7 +139,8 @@ function fixLeftRightHeightAndFocus(fix_height) {\n ...@@ -132,7 +139,8 @@ function fixLeftRightHeightAndFocus(fix_height) {\n
fixLeftRightHeight();\n fixLeftRightHeight();\n
}\n }\n
autoFocus();\n autoFocus();\n
} }\n
]]></string> </value> ]]></string> </value>
</item> </item>
......
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. * Add new selector for matrixbox style attribute wich were hardcoded (and not valid) before r19976.
2008-03-06 jerome 2008-03-06 jerome
......
511 514
\ 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