[Erp5-report] r31538 fabien - in /erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style: Skin...

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Dec 30 16:24:13 CET 2009


Author: fabien
Date: Wed Dec 30 16:24:11 2009
New Revision: 31538

URL: http://svn.erp5.org?rev=31538&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/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_access_tab/ERP5Site_renderQuickSearchDialog.xml
    erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/ListBox_asSearchStyleHTML.xml
    erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/navigation_box_render.xml
    erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/revision

Modified: erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_access_tab/ERP5Site_renderQuickSearchDialog.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_access_tab/ERP5Site_renderQuickSearchDialog.xml?rev=31538&r1=31537&r2=31538&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_access_tab/ERP5Site_renderQuickSearchDialog.xml [utf8] (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_access_tab/ERP5Site_renderQuickSearchDialog.xml [utf8] Wed Dec 30 16:24:11 2009
@@ -43,8 +43,12 @@
            xmlns:i18n="http://xml.zope.org/namespaces/i18n"\n
   tal:define="dummy python: request.RESPONSE.setHeader(\'Content-Type\', \n
                                                        \'text/html;; charset=utf-8\');">\n
-  <div>\n
-    <input type="text" onkeypress="submitFormOnEnter(event, this.form, \'ERP5Site_processAdvancedSearch\');" class="input-text" name="top_your_search_text" size="40" accesskey="4"/>\n
+  <div tal:define="search_default_text python:here.Base_translateString(\'Search\')">\n
+    <input type="text" onkeypress="submitFormOnEnter(event, this.form, \'ERP5Site_processAdvancedSearch\');"\n
+      value="Search" tal:attributes="value string:${search_default_text};\n
+                                     onfocus string:if (this.value==\'${search_default_text}\') this.value=\'\';"\n
+      onfocus="this.value=\'\';"\n
+      class="input-text" name="top_your_search_text" size="40" accesskey="4"/>\n
     <select size="1" class="input" name="top_your_search_portal_type">\n
       <option value="" selected="selected" i18n:translate="" i18n:domain="ui">Everything</option>\n
       <option value="all" i18n:translate="" i18n:domain="ui">All Documents</option>\n

Modified: erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/ListBox_asSearchStyleHTML.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/ListBox_asSearchStyleHTML.xml?rev=31538&r1=31537&r2=31538&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/ListBox_asSearchStyleHTML.xml [utf8] (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/ListBox_asSearchStyleHTML.xml [utf8] Wed Dec 30 16:24:11 2009
@@ -73,11 +73,15 @@
         <div class="search result">\n
 \n
           <!-- Advanced Search header -->\n
-          <div class="centeredInner searchBar" \n
+          <div class="centeredInner searchBar"\n
+               tal:define="search_default_text python:context.getContext().Base_translateString(\'Search\')"\n
                tal:condition="python:not is_gadget_mode and show_search_line">\n
             <input name="top_your_search_text" size="40" value="" type="text"\n
-                   onkeypress="submitFormOnEnter(event, this.form, \'ERP5Site_processAdvancedSearch\');"\n
-                   tal:attributes="value your_search_text" />\n
+                   value="Search" tal:attributes="value your_search_text | search_default_text;\n
+                                                  onfocus string:if (this.value==\'${search_default_text}\') this.value=\'\';"\n
+\n
+                   onfocus="this.value=\'\';"\n
+                   onkeypress="submitFormOnEnter(event, this.form, \'ERP5Site_processAdvancedSearch\');"/>\n
             <input class="button" i18n:domain="ui" i18n:attributes="value"\n
                    value="Search" name="ERP5Site_processAdvancedSearch:method" type="submit" />\n
           </div>\n

Modified: erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/navigation_box_render.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/navigation_box_render.xml?rev=31538&r1=31537&r2=31538&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/navigation_box_render.xml [utf8] (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/navigation_box_render.xml [utf8] Wed Dec 30 16:24:11 2009
@@ -124,9 +124,12 @@
         </button>\n
       </span>\n
       <span class="separator"><!--separator--></span>\n
-      <span id="search">\n
+      <span id="search" tal:define="search_default_text python:here.Base_translateString(\'Search\')">\n
         <input type="hidden" name="all_languages" value="1" />\n
-        <input accesskey="4" type="text" name="field_your_search_text" \n
+        <input accesskey="4" type="text" name="field_your_search_text"\n
+          value="Search" tal:attributes="value string:${search_default_text};\n
+                                         onfocus string:if (this.value==\'${search_default_text}\') this.value=\'\';"\n
+          onfocus="this.value=\'\';"\n
           onkeypress="submitFormOnEnter(event, this.form, \'ERP5Site_viewQuickSearchResultList\');" />\n
         <button type="submit" name="ERP5Site_viewQuickSearchResultList:method" title="Search"\n
                 i18n:attributes="title" i18n:domain="ui">\n

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=31538&r1=31537&r2=31538&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/revision [utf8] (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/revision [utf8] Wed Dec 30 16:24:11 2009
@@ -1,1 +1,1 @@
-855
+856




More information about the Erp5-report mailing list