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 bbbb192e44575e82e23b7938921bcbd6457af214..a3035ec5e2433d572018b0e6fc9a7b2f7282e981 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 @@ -74,8 +74,8 @@ function clickSaveButton(act) {\n \n \n // The first input element with an "autofocus" class will get the focus,\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 +// else if no element have autofocus class, the first element which is not the\n +// search field will get the focus. This is generally the title input text of\n // a view\n function autoFocus() {\n var first_autofocus_expr = ".//input[@class=\'autofocus\']"\n @@ -85,11 +85,12 @@ function autoFocus() {\n if (input) {\n input.focus();\n }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 - if (first_text_input){\n - first_text_input.focus();\n - }\n + // The following is disabled, because it is too annoying to have an auto focus at everywhere.\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 + //if (first_text_input){\n + // first_text_input.focus();\n + //}\n }\n }\n \n diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/bt/change_log b/product/ERP5/bootstrap/erp5_xhtml_style/bt/change_log index 3de55a81c752353a9ff0b4ac38fba222aaed2099..8f840aaee31bdb677a86f224fdc9b55e1e44e6df 100644 --- a/product/ERP5/bootstrap/erp5_xhtml_style/bt/change_log +++ b/product/ERP5/bootstrap/erp5_xhtml_style/bt/change_log @@ -1,3 +1,6 @@ +2008-04-11 yo +* Disable auto focus for forms which do not have an element with the autofocus class. + 2008-03-27 ivan * Update MochiKit JS library to 1.4 diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision b/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision index a9d3bc092c8999e1142b1691c0aea2cba4d12bda..a1a25e0f23954c3850987eea23982fe98b99a677 100644 --- a/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision +++ b/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision @@ -1 +1 @@ -523 \ No newline at end of file +524 \ No newline at end of file