[Erp5-report] r31539 fabien - in /erp5/trunk/bt5/erp5_web_multiflex5_theme: SkinTemplateIte...

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Dec 30 16:29:35 CET 2009


Author: fabien
Date: Wed Dec 30 16:29:34 2009
New Revision: 31539

URL: http://svn.erp5.org?rev=31539&view=rev
Log:
Write "Search" in the bottom right search.

It was reported that in some web_site (like km), some people think that this field was used to login. Writing "Search" inside make not possible to think this now. (And when the field get the focus, the field make him empty to be able to receive the search text).

I try this without javascript support, and the search is usable, the only thing is that the user have to remove the default text manualy (it's the behaviour of most of the popular websites).

reviewed and approved by jm

Modified:
    erp5/trunk/bt5/erp5_web_multiflex5_theme/SkinTemplateItem/portal_skins/erp5_web_multiflex5_theme/WebSection_viewSearchBar.xml
    erp5/trunk/bt5/erp5_web_multiflex5_theme/bt/revision

Modified: erp5/trunk/bt5/erp5_web_multiflex5_theme/SkinTemplateItem/portal_skins/erp5_web_multiflex5_theme/WebSection_viewSearchBar.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_web_multiflex5_theme/SkinTemplateItem/portal_skins/erp5_web_multiflex5_theme/WebSection_viewSearchBar.xml?rev=31539&r1=31538&r2=31539&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_web_multiflex5_theme/SkinTemplateItem/portal_skins/erp5_web_multiflex5_theme/WebSection_viewSearchBar.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_web_multiflex5_theme/SkinTemplateItem/portal_skins/erp5_web_multiflex5_theme/WebSection_viewSearchBar.xml [utf8] Wed Dec 30 16:29:34 2009
@@ -52,10 +52,13 @@
 <tal:block tal:define="current_web_section python:request.get(\'current_web_section\', here);\n
                        search_area_section_id python:current_web_section.getLayoutProperty(\'layout_search_area_section_id\', \'\')">\n
 <div class="searchform">\n
-  <fieldset>\n
+  <fieldset tal:define="search_default_text python:current_web_section.Base_translateString(\'Search\')">\n
     <input name="field_your_search_text" class="field" value=""\n
-           onkeyup="submitFormOnEnter(event, this.form, \'search_area/ERP5Site_viewQuickSearchResultList\');"\n
-           tal:attributes="onkeyup string:submitFormOnEnter(event, this.form, \'${search_area_section_id}/ERP5Site_viewQuickSearchResultList\');" />\n
+           value="Search" tal:attributes="value string:${search_default_text};\n
+                                          onfocus string:if (this.value==\'${search_default_text}\') this.value=\'\';\n
+                                          onkeyup string:submitFormOnEnter(event, this.form, \'${search_area_section_id}/ERP5Site_viewQuickSearchResultList\');"\n
+           onfocus="this.value=\'\';"\n
+           onkeyup="submitFormOnEnter(event, this.form, \'search_area/ERP5Site_viewQuickSearchResultList\');"/>\n
     <input type="submit" class="button" value="Search" name="search_area/ERP5Site_viewQuickSearchResultList:method"\n
            tal:attributes="name string:${search_area_section_id}/ERP5Site_viewQuickSearchResultList:method"\n
            i18n:attributes="value" i18n:domain="ui" />\n

Modified: erp5/trunk/bt5/erp5_web_multiflex5_theme/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_web_multiflex5_theme/bt/revision?rev=31539&r1=31538&r2=31539&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_web_multiflex5_theme/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_web_multiflex5_theme/bt/revision [utf8] Wed Dec 30 16:29:34 2009
@@ -1,1 +1,1 @@
-149
+151




More information about the Erp5-report mailing list