diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/erp5.js.xml b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/erp5.js.xml index e12183bb7b046d0e09e7da12e12eea7e0a7fcd3f..5fa02e81dbb80cc80c0b1a47075504722d724e7d 100644 --- a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/erp5.js.xml +++ b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/erp5.js.xml @@ -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 @@ function clickSaveButton(act) {\n \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 @@ function autoFocus() {\n }\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 @@ function fixLeftRightHeightAndFocus(fix_height) {\n fixLeftRightHeight();\n }\n autoFocus();\n -} +}\n + ]]></string> </value> </item> diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/bt/change_log b/product/ERP5/bootstrap/erp5_xhtml_style/bt/change_log index ea3e8fc1312496ebafa9d7aba2468a5fc9626fb2..da1d0fab5de4dc35c33409e2d42c020ace3a868e 100644 --- a/product/ERP5/bootstrap/erp5_xhtml_style/bt/change_log +++ b/product/ERP5/bootstrap/erp5_xhtml_style/bt/change_log @@ -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 diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision b/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision index 430faa64e76e7478e4653bc318c717b548aa76e8..54a584dece54566d69277ced81fff9d12cbd7243 100644 --- a/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision +++ b/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision @@ -1 +1 @@ -511 \ No newline at end of file +514 \ No newline at end of file