[Erp5-report] r37340 ivan - in /erp5/trunk/bt5/erp5_km: SkinTemplateItem/portal_skins/erp5_...

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Jul 28 15:15:11 CEST 2010


Author: ivan
Date: Wed Jul 28 15:15:10 2010
New Revision: 37340

URL: http://svn.erp5.org?rev=37340&view=rev
Log:
It's possible reuse full text configuration from listbox definition.

Modified:
    erp5/trunk/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/ListBox_asHTML.xml
    erp5/trunk/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/WebSite_viewAdvancedSearchResultList.xml
    erp5/trunk/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/WebSite_viewAdvancedSearchResultList/listbox.xml
    erp5/trunk/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/km_css/listbox.css.xml
    erp5/trunk/bt5/erp5_km/bt/revision

Modified: erp5/trunk/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/ListBox_asHTML.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/ListBox_asHTML.xml?rev=37340&r1=37339&r2=37340&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/ListBox_asHTML.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/ListBox_asHTML.xml [utf8] Wed Jul 28 15:15:10 2010
@@ -67,6 +67,9 @@
                                              selection.getParams().get(\'list_style\', here.getDefaultDisplayStyle()));\n
               dummy python: list_style == \'search\' and here.setDisplayedColumnIdList((\'getIconAsHTML\', \'getSummaryAsHTML\'))\n
                            or list_style == \'thumbnail\' and here.setDisplayedColumnIdList((\'title\', \'thumbnail\'));\n
+              full_text_search_key here/getFullTextSearchKey;\n
+              full_text_search_key_script here/getFullTextSearchKeyScript;\n
+              show_full_text python: full_text_search_key not in (\'\', None) and full_text_search_key_script not in (\'\', None);\n
               line_list here/query;\n
               listbox_max_lines  python: int(here.getMaxLineNumber());\n
               total_line         python: int(here.total_size);\n
@@ -442,7 +445,7 @@
       <!-- Choose display mode -->\n
       <!--TODO define show_display_selection macro-->\n
       <div tal:condition="python: len(display_style_list) > 0"\n
-           class="list-style-selection">\n
+           class="listbox-list-style-selection">\n
         <span i18n:translate="" i18n:domain="ui">Display:</span>\n
         <ul>\n
           <li tal:repeat="style display_style_list">\n
@@ -454,29 +457,32 @@
         </ul>\n
       </div>\n
 \n
-      <!-- Full Text Search -->\n
-      <!--XXX This implementation is not finished.-->\n
-      <tal:comment tal:replace="nothing">\n
-      <div tal:define="your_search_text nothing"\n
-                tal:condition="python: show_full_text" \n
-                class="extendedSearchBar">\n
-        <tal:block tal:condition="python: not is_gadget_mode">\n
+      <!-- Extra Search -->\n
+      <div tal:define="search_text real_context/Base_getSearchText"\n
+           tal:condition="show_full_text" \n
+           class="listbox-full-text-search">\n
+\n
+        <tal:block tal:condition="not: is_gadget_mode">\n
           <!-- Normal mode -->\n
-          <input name="bottom_your_search_text" size="25" value="" type="text"\n
-                onkeypress="submitFormOnEnter(event, this.form,           \'ERP5Site_processAdvancedSearchBottom\');"\n
-                tal:attributes="value your_search_text" />\n
-            <input class="button" i18n:domain="ui" i18n:attributes="value"\n
-                  value="Search" name="ERP5Site_processAdvancedSearchBottom:method" type="submit" />\n
-          </tal:block>\n
-          <tal:block tal:condition="python: is_gadget_mode">\n
-            <!-- Gadget mode -->\n
-              <input tal:define ="params python: {\'ERP5Site_processAdvancedSearchBottom:method\':\'\',\'bottom_your_search_text\':\'this.value\'};"\n
-                      name="bottom_your_search_text" size="25" value="" type="text"\n
-                      tal:attributes=\'value your_search_text;\n
-                                    onkeypress python:"if(event.keyCode==13){" + real_context.KnowledgePad_generateAjaxCall(context_url+"/"+form_id,box,box_id,params).replace("\\"this.value\\"","this.value")+ "return false;;}"\'/>\n
-          </tal:block>\n
-        </div>    \n
-        </tal:comment>\n
+          <input type="text"\n
+                 tal:attributes="value search_text;\n
+                                 name full_text_search_key;\n
+                                 onkeypress string: submitFormOnEnter(event, this.form, \'${full_text_search_key_script}\');"/>\n
+            <input class="button" \n
+                   i18n:domain="ui" i18n:attributes="value"\n
+                   value="Search"  type="submit" \n
+                   tal:attributes="name string:${full_text_search_key_script}:method"/>\n
+        </tal:block>\n
+        <tal:block tal:condition="is_gadget_mode">\n
+          <!-- Gadget mode -->\n
+          <input tal:define="params python: {\'%s:method\' %full_text_search_key_script:\'\',\'%s\' %full_text_search_key:\'this.value\'};"\n
+                 type="text"\n
+                 tal:attributes=\'value search_text;\n
+                                 name full_text_search_key;\n
+                                 onkeypress python:"if(event.keyCode==13){" + real_context.KnowledgePad_generateAjaxCall(context_url+"/"+form_id,box,box_id,params).replace("\\"this.value\\"","this.value")+ "return false;;}"\'/>\n
+        </tal:block>\n
+      </div>    \n
+\n
         </div>\n
         <div class="listbox_footer_box"\n
             tal:define="need_pagination python: int(here.total_size) > int(here.getMaxLineNumber())"\n

Modified: erp5/trunk/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/WebSite_viewAdvancedSearchResultList.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/WebSite_viewAdvancedSearchResultList.xml?rev=37340&r1=37339&r2=37340&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/WebSite_viewAdvancedSearchResultList.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/WebSite_viewAdvancedSearchResultList.xml [utf8] Wed Jul 28 15:15:10 2010
@@ -76,9 +76,7 @@
                     <key> <string>bottom</string> </key>
                     <value>
                       <list>
-                        <string>top_search_text</string>
                         <string>listbox</string>
-                        <string>bottom_search_text</string>
                       </list>
                     </value>
                 </item>

Modified: erp5/trunk/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/WebSite_viewAdvancedSearchResultList/listbox.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/WebSite_viewAdvancedSearchResultList/listbox.xml?rev=37340&r1=37339&r2=37340&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/WebSite_viewAdvancedSearchResultList/listbox.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/WebSite_viewAdvancedSearchResultList/listbox.xml [utf8] Wed Jul 28 15:15:10 2010
@@ -463,6 +463,14 @@
                     <value> <int>0</int> </value>
                 </item>
                 <item>
+                    <key> <string>full_text_search_key</string> </key>
+                    <value> <string>field_your_search_text_listbox</string> </value>
+                </item>
+                <item>
+                    <key> <string>full_text_search_key_script</string> </key>
+                    <value> <string>WebSite_viewQuickSearchResultList</string> </value>
+                </item>
+                <item>
                     <key> <string>global_attributes</string> </key>
                     <value>
                       <list/>

Modified: erp5/trunk/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/km_css/listbox.css.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/km_css/listbox.css.xml?rev=37340&r1=37339&r2=37340&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/km_css/listbox.css.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_theme/km_css/listbox.css.xml [utf8] Wed Jul 28 15:15:10 2010
@@ -219,39 +219,44 @@ div.search_popup{\n
 }\n
 \n
 /* List style selection */\n
-div.list-style-selection {\n
+div.listbox-list-style-selection {\n
   width:auto;\n
   float:left;\n
 }\n
-div.list-style-selection span{\n
+div.listbox-list-style-selection span{\n
   font-weight:bold;\n
   padding-left:10px;\n
   vertical-align:-4px;\n
 }\n
-div.list-style-selection ul{\n
+div.listbox-list-style-selection ul{\n
   display:inline;\n
   padding-left:0;\n
   margin: 0;\n
   vertical-align: -4px;\n
 }\n
-div.list-style-selection li{\n
+div.listbox-list-style-selection li{\n
   display: inline;\n
 }\n
-div.list-style-selection li a.selected{\n
+div.listbox-list-style-selection li a.selected{\n
   font-weight: bold;\n
 }\n
-/* Search bar */\n
-div.extendedSearchBar {\n
+\n
+/* Listbox full text search bar */\n
+div.listbox-full-text-search {\n
   float:left;\n
   margin-top:0;\n
   padding:1em 0 0.5em;\n
 }\n
-div.extendedSearchBar input.button{\n
+div.listbox-full-text-search input{\n
+  width: auto;\n
+}\n
+div.listbox-full-text-search input.button{\n
  background-image: url(\'./km_img/search_background.png\');\n
  background-color: inherit;\n
  border: 0 none;\n
  color:#FFFFFF;\n
 }\n
+\n
 div.resultList{\n
   float:left;\n
 }\n

Modified: erp5/trunk/bt5/erp5_km/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_km/bt/revision?rev=37340&r1=37339&r2=37340&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_km/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_km/bt/revision [utf8] Wed Jul 28 15:15:10 2010
@@ -1 +1 @@
-1497
\ No newline at end of file
+1498
\ No newline at end of file




More information about the Erp5-report mailing list