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

nobody at svn.erp5.org nobody at svn.erp5.org
Fri Jul 30 08:40:13 CEST 2010


Author: ivan
Date: Fri Jul 30 08:40:12 2010
New Revision: 37370

URL: http://svn.erp5.org?rev=37370&view=rev
Log:
Make sort buttons work in gadget mode as well.
CSS cleanup & generalization.

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/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=37370&r1=37369&r2=37370&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] Fri Jul 30 08:40:12 2010
@@ -137,11 +137,11 @@
             <td colspan="1" \n
                 class="listbox-table-domain-tree-cell"\n
                 tal:attributes="colspan python: total_depth - report_tree.depth + 1">\n
-              <a href="method" class="tree_open selected"\n
+              <a href="method" class="tree-open selected"\n
                  tal:condition="report_tree/is_open"\n
                  tal:attributes="href string:foldDomain?domain_url=${report_tree/domain_url}&form_id=${form_id}&list_selection_name=${selection_name}&domain_depth:int=${report_tree/depth}"\n
                  tal:content="report_tree/obj/getCompactTranslatedTitle"/>\n
-              <a href="method" class="tree_closed"\n
+              <a href="method" class="tree-closed"\n
                  tal:condition="not: report_tree/is_open"\n
                  tal:attributes="href string:unfoldDomain?domain_url=${report_tree/domain_url}&form_id=${form_id}&list_selection_name=${selection_name}&domain_depth:int=${report_tree/depth}"\n
                  tal:content="report_tree/obj/getCompactTranslatedTitle"/>\n
@@ -218,32 +218,29 @@
                                        title      python: value[1];\n
                                        sort_order python: value[2]">\n
 \n
-                  <th tal:condition="sql" class="listbox-table-header-cell">                 \n
+                  <th tal:condition="sql" class="listbox-table-header-cell"\n
+                      tal:define="bt_class python:  sort_order==\'ascending\' and \'sort-button sort-button-asc\' \n
+                                  or sort_order == \'descending\' and \'sort-button sort-button-desc\' \n
+                                  or \'sort-button\'">                 \n
                     <!-- Button in normal view -->\n
-                    <button tal:define="\n
-                          bt_class python:  sort_order==\'ascending\' and \'sort_button sort_button_asc\' \n
-                          or sort_order == \'descending\' and \'sort_button sort_button_desc\' \n
-                          or \'sort_button\'"\n
-                          tal:condition="not:is_gadget_mode" \n
-                          type="submit"\n
-                          name="setSelectionQuickSortOrder:method"\n
-                          tal:attributes="title string:${title}; \n
-                                          value string:${field_id}.${sql};\n
-                                          class bt_class;"\n
-                          i18n:domain="ui" i18n:attributes="title">\n
-                      <span tal:content="title" i18n:domain="ui" i18n:translate=""/>\n
-                    </button>\n
+                    <button tal:condition="not:is_gadget_mode" \n
+                            type="submit"\n
+                            name="setSelectionQuickSortOrder:method"\n
+                            tal:content="title"\n
+                            tal:attributes="title string:${title}; \n
+                                            value string:${field_id}.${sql};\n
+                                            class bt_class;"\n
+                            i18n:domain="ui" i18n:attributes="title" />\n
 \n
                     <!-- Button in gadget mode -->\n
                     <button tal:condition="is_gadget_mode" \n
                             tal:define ="params python: {\'setSelectionQuickSortOrder:method\':field_id+\'.\'+sql};"\n
                             type="button"  \n
-                            class="sort_button"\n
+                            tal:content="title"\n
                             tal:attributes="title string:${title}; \n
-                                            onclick python: real_context.KnowledgePad_generateAjaxCall(context_url+\'/\'+form_id,box,dom_id,params);"\n
-                            i18n:domain="ui" i18n:attributes="title">\n
-                      <span tal:content="title" i18n:domain="ui" i18n:translate=""/>\n
-                    </button>\n
+                                            onclick python: real_context.KnowledgePad_generateAjaxCall(context_url+\'/\'+form_id,box,dom_id,params);\n
+                                            class bt_class;"\n
+                            i18n:domain="ui" i18n:attributes="title"/>\n
                   </th>\n
 \n
                   <th class="listbox-table-header-cell"\n
@@ -346,7 +343,7 @@
                     <a  tal:condition="section_name"\n
                         tal:define="method_id python: line.isOpen() and \'foldReport\' or \'unfoldReport\'"\n
                         tal:attributes="href string:${method_id}?report_url=${line/getDomainUrl}&amp;form_id=${form_id}&amp;list_selection_name=${selection_name};\n
-                                        class python:test(line.isOpen(), \'tree_open\', \'tree_closed\');\n
+                                        class python:test(line.isOpen(), \'tree-open\', \'tree-closed\');\n
                                         style python:\'white-space: nowrap;; margin-left: %spx\' % (line.getDepth() * 15)"\n
                         tal:content="section_name"/>\n
                   </td>\n

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=37370&r1=37369&r2=37370&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] Fri Jul 30 08:40:12 2010
@@ -153,7 +153,6 @@ div.search_popup{\n
   position:relative;\n
 }\n
 \n
-\n
 /*Define all button image*/\n
 <tal:block tal:define="buttons python: [\'cut\',\'copy\',\'paste\',\'delete\',\'print\',\'new\',\'reset\',\'filter\',\'find\',\'sort\',\'config\']">\n
 <tal:block tal:repeat ="button buttons">\n
@@ -167,7 +166,7 @@ div.search_popup{\n
 \n
 \n
 /*********************/\n
-/*   Listbox style   */\n
+/*   Listbox style (XXX: move to erp5.css)   */\n
 /*********************/\n
 div.listbox-container{\n
   width: 100%;\n
@@ -194,7 +193,6 @@ div.listbox-body{\n
   width:auto;\n
 }\n
 \n
-/* List mode selection*/\n
 div.listbox-tree-mode-selection{\n
   height: 22px;\n
   width: auto;\n
@@ -205,18 +203,10 @@ div.listbox-tree-mode-selection input{\n
   width: auto;\n
 }\n
 \n
-\n
 th.listbox-table-report-tree-selection-cell{\n
   width: 50px; \n
 }\n
 \n
-td.listbox-table-domain-tree-cell{\n
-  text-align: left; \n
-  vertical-align: top; \n
-  white-space: nowrap;\n
-}\n
-\n
-/*Footer block*/\n
 div.listbox-footer{\n
  background-color:#F0EFE9;\n
  float:left;\n
@@ -280,14 +270,6 @@ div.listbox-full-text-search input.butto
  width: auto;\n
 }\n
 \n
-div.resultList{\n
-  float:left;\n
-}\n
-div.searchResultHeader{\n
-  float:left;\n
-}\n
-\n
-\n
 /* Pagination*/\n
 div.listbox-page-navigation{\n
   width:auto;\n
@@ -300,12 +282,12 @@ div.listbox-page-navigation input{\n
 }\n
 \n
 /* Report tree */\n
-a.tree_closed {\n
+a.tree-closed {\n
   background:transparent url(\'./images/tree_closed.png\') no-repeat scroll left center;\n
   padding-left:15px;\n
 }\n
 \n
-a.tree_open {\n
+a.tree-open {\n
   background:transparent url(\'./images/tree_open.png\') no-repeat scroll left center;\n
   padding-left:15px;\n
 }\n
@@ -313,29 +295,50 @@ a.tree_open {\n
 div.listbox-tree select{\n
   max-width:120px;\n
 }\n
+\n
 /*Table Listbox elements */\n
-.listbox th {\n
+table.listbox{\n
+  border-collapse:collapse;\n
+  width:100%;\n
+}\n
+\n
+table.listbox th,\n
+table.listbox td {\n
   text-align:left;\n
   vertical-align: top;\n
 }\n
-.listbox-search-line, .listbox-label-line{\n
-  background-color: #F0EFE9;\n
-}\n
-.listbox-search-line th{\n
-  background-color: inherit;\n
-}\n
 \n
-.listbox select {\n
-  max-width: 145px;\n
+table.listbox th button{\n
+  border-width:0;\n
+  cursor:pointer;\n
+  float:left;\n
+  font-weight:bold;\n
+  padding:0 6px 0 0;\n
 }\n
 \n
-button.sort_button_desc{\n
+/* KM specific */\n
+table.listbox th button.sort-button {\n
+  background:transparent url("../km_img/switch.png") no-repeat scroll 100% 50%;\n
+}\n
+table.listbox th button.sort-button:hover{\n
+  color: #FFF;\n
+}\n
+table.listbox th button.sort-button-desc{\n
   background-image: url(\'./km_img/switch_desc.png\');\n
 }\n
-button.sort_button_asc{\n
+table.listbox th button.sort-button-asc{\n
   background-image: url(\'./km_img/switch_asc.png\');\n
 }\n
 \n
+/* KM specific */\n
+.listbox-search-line, .listbox-label-line{\n
+  background-color: #F0EFE9;\n
+}\n
+\n
+.listbox-search-line th{\n
+  background-color: inherit;\n
+}\n
+\n
 /* in search mode listbox may contain top/ bottom quick search inputs */\n
 div.search-text-listbox{\n
   text-align: center;\n
@@ -344,10 +347,10 @@ div.search-text-listbox{\n
   margin-bottom:0.5em;\n
   margin-top:0.5em;\n
 }\n
+\n
 div.search-text-listbox input{\n
   width: auto;\n
-}\n
-
+}
 
 ]]></string> </value>
         </item>

Modified: erp5/trunk/bt5/erp5_km/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_km/bt/revision?rev=37370&r1=37369&r2=37370&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_km/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_km/bt/revision [utf8] Fri Jul 30 08:40:12 2010
@@ -1 +1 @@
-1503
\ No newline at end of file
+1505
\ No newline at end of file




More information about the Erp5-report mailing list