[Erp5-report] r38092 ivan - in /erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style: SkinTe...

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Sep 1 10:04:54 CEST 2010


Author: ivan
Date: Wed Sep  1 10:04:54 2010
New Revision: 38092

URL: http://svn.erp5.org?rev=38092&view=rev
Log:
Small optimization.

Modified:
    erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/page_navigation_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_xhtml_style/page_navigation_render.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/page_navigation_render.xml?rev=38092&r1=38091&r2=38092&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/page_navigation_render.xml [utf8] (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/page_navigation_render.xml [utf8] Wed Sep  1 10:04:54 2010
@@ -51,7 +51,7 @@
               class="listbox_first_page"\n
               tal:attributes="name string:${field_id}_firstPage:method;\n
                               src string:${portal_url_string}/images/2leftarrowv.png;\n
-                              class python: test(field_id==\'listbox\', \'listbox_first_page\', \'listbox_first_page %s_first_page\' %field_id)"\n
+                              class python: test(is_default_listbox_field, \'listbox_first_page\', \'listbox_first_page %s_first_page\' %field_id)"\n
               i18n:domain="ui" i18n:attributes="title">\n
         <span class="image"/>\n
       </button>\n
@@ -60,7 +60,7 @@
               class="listbox_previous_page"\n
               tal:attributes="name string:${field_id}_previousPage:method;\n
                               src string:${portal_url_string}/images/1leftarrowv.png;\n
-                              class python: test(field_id==\'listbox\', \'listbox_previous_page\', \'listbox_previous_page %s_previous_page\' %field_id)"\n
+                              class python: test(is_default_listbox_field, \'listbox_previous_page\', \'listbox_previous_page %s_previous_page\' %field_id)"\n
               i18n:domain="ui" i18n:attributes="title">\n
         <span class="image"/>\n
       </button>\n
@@ -77,7 +77,7 @@
               title="Next Page" name="nextPage:method" class="listbox_next_page"\n
               tal:attributes="name string:${field_id}_nextPage:method;\n
                               src string:${portal_url_string}/images/1rightarrowv.png;\n
-                              class python: test(field_id==\'listbox\', \'listbox_next_page\', \'listbox_next_page %s_next_page\' %field_id)"\n
+                              class python: test(is_default_listbox_field, \'listbox_next_page\', \'listbox_next_page %s_next_page\' %field_id)"\n
               i18n:domain="ui" i18n:attributes="title">\n
         <span class="image"/>\n
       </button>\n
@@ -85,7 +85,7 @@
               title="Last Page" name="lastPage:method" class="listbox_last_page"\n
               tal:attributes="name string:${field_id}_lastPage:method;\n
                               src string:${portal_url_string}/images/2rightarrowv.png;\n
-                              class python: test(field_id==\'listbox\', \'listbox_last_page\', \'listbox_last_page %s_last_page\' %field_id)"\n
+                              class python: test(is_default_listbox_field, \'listbox_last_page\', \'listbox_last_page %s_last_page\' %field_id)"\n
               i18n:domain="ui" i18n:attributes="title" >\n
         <span class="image"/>\n
       </button>\n
@@ -97,7 +97,6 @@
   <!-- First & Previous button navigation (asynchronous mode) --> \n
   <tal:block metal:define-macro="first_previous_page_navigation_asynchronous">\n
 \n
-\n
     <tal:block tal:condition="python: here.current_page > 0">\n
         <button tal:define ="params python: {field_id+\'_firstPage:method\':\'\', \'list_style\':list_style}"\n
                  title="First Page" \n
@@ -107,7 +106,7 @@
                  tal:attributes="value string:|&lt;;\n
                                  onclick python:\n
                                  real_context.KnowledgePad_generateAjaxCall(context_url+\'/\'+form_id,box,dom_id,params);\n
-                                 class python: test(field_id==\'listbox\', \'listbox_first_page\', \'listbox_first_page %s_first_page\' %field_id)"\n
+                                 class python: test(is_default_listbox_field, \'listbox_first_page\', \'listbox_first_page %s_first_page\' %field_id)"\n
                  i18n:domain="ui" i18n:attributes="title">\n
             <span class="image"/>\n
           </button>\n
@@ -118,7 +117,7 @@
                   class="listbox_previous_page"\n
                   tal:attributes="value string:&lt;&lt;;\n
                                   onclick python: real_context.KnowledgePad_generateAjaxCall(context_url+\'/\'+form_id,box,dom_id,params);\n
-                                  class python: test(field_id==\'listbox\', \'listbox_previous_page\', \'listbox_previous_page %s_previous_page\' %field_id)"\n
+                                  class python: test(is_default_listbox_field, \'listbox_previous_page\', \'listbox_previous_page %s_previous_page\' %field_id)"\n
                   i18n:domain="ui" i18n:attributes="title">\n
             <span class="image"/>\n
           </button>\n
@@ -128,6 +127,7 @@
 \n
   <!-- Next & Last button navigation (asynchronous mode) --> \n
   <tal:block metal:define-macro="next_last_page_navigation_asynchronous">\n
+\n
     <tal:block tal:condition="python: current_page < total_page">\n
       <button tal:define ="params python: {field_id+\'_nextPage:method\':\'\',\'page_start\':here.current_page+1,\'list_style\':list_style}"\n
               title="Next Page"\n
@@ -135,7 +135,7 @@
               type="button"\n
               class="listbox_next_page"\n
               tal:attributes="onclick python: real_context.KnowledgePad_generateAjaxCall(context_url+\'/\'+form_id,box,dom_id,params);\n
-                              class python: test(field_id==\'listbox\', \'listbox_next_page\', \'listbox_next_page %s_next_page\' %field_id)"\n
+                              class python: test(is_default_listbox_field, \'listbox_next_page\', \'listbox_next_page %s_next_page\' %field_id)"\n
               i18n:domain="ui" i18n:attributes="title">\n
             <span class="image"/>\n
        </button>\n
@@ -145,7 +145,7 @@
                type="button"\n
                class="listbox_last_page"\n
                tal:attributes="onclick python: real_context.KnowledgePad_generateAjaxCall(context_url+\'/\'+form_id,box,dom_id,params);\n
-                               class python: test(field_id==\'listbox\', \'listbox_last_page\', \'listbox_last_page %s_last_page\' %field_id)"\n
+                               class python: test(is_default_listbox_field, \'listbox_last_page\', \'listbox_last_page %s_last_page\' %field_id)"\n
                i18n:domain="ui" i18n:attributes="title">\n
             <span class="image"/>\n
        </button>\n
@@ -158,7 +158,7 @@
     <input class="listbox_set_page" \n
            name="page_start" onblur="this.value=this.defaultValue"\n
            tal:attributes="name string:${field_id}_page_start;\n
-                           class python: test(field_id==\'listbox\', \'listbox_set_page\', \'listbox_set_page %s_set_page\' %field_id);\n
+                           class python: test(is_default_listbox_field, \'listbox_set_page\', \'listbox_set_page %s_set_page\' %field_id);\n
                            value python:here.current_page + 1;\n
                            size python:len(str(here.total_pages));\n
                            onkeypress string:submitFormOnEnter(event, this.form, \'${field_id}_setPage\')" />\n
@@ -172,7 +172,7 @@
            name="page_start" onblur="this.value=this.defaultValue"\n
            tal:define="params python: {field_id+\'_setPage:method\':\'\',field_id+\'_page_start\':\'this.value\',\'list_style\':list_style}"\n
            tal:attributes=\'name string:${field_id}_page_start;\n
-                           class python: test(field_id=="listbox", "listbox_set_page", "listbox_set_page %s_set_page" %field_id);\n
+                           class python: test(is_default_listbox_field, "listbox_set_page", "listbox_set_page %s_set_page" %field_id);\n
                            value python:here.current_page + 1;\n
                            size python:len(str(here.total_pages));\n
                            onkeypress python:"if(event.keyCode==13){" + real_context.KnowledgePad_generateAjaxCall(context_url+"/"+form_id,box,dom_id,params).replace("\\"this.value\\"","this.value")+ "return false;;}"\'/>\n
@@ -205,7 +205,8 @@
   <tal:block metal:define-macro="text_navigation"\n
                    tal:define="offset python: 7;\n
                                all_page_index_list python: range(1, here.total_pages + 1);\n
-                               page_index_list python: all_page_index_list[max(current_page-offset, 1)-1: min(current_page+offset, len(all_page_index_list))];">\n
+                               page_index_list python: all_page_index_list[max(current_page-offset, 1)-1: min(current_page+offset, len(all_page_index_list))];\n
+                               is_default_listbox_field python: field_id==\'listbox\';">\n
 \n
     <!-- Non gadget mode -->\n
     <tal:block tal:condition="not: is_gadget_mode">\n
@@ -230,7 +231,8 @@
   </tal:block>\n
 \n
   <!-- Slider navigation with input  (i.e. first, previous, next, last links)-->\n
-  <tal:block metal:define-macro="page_navigation">\n
+  <tal:block metal:define-macro="page_navigation"\n
+             tal:define="is_default_listbox_field python: field_id==\'listbox\';">\n
     <tal:block tal:condition="python: here.total_pages > 1">\n
 \n
       <!-- Non gadget mode -->\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=38092&r1=38091&r2=38092&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 Sep  1 10:04:54 2010
@@ -1 +1 @@
-978
\ No newline at end of file
+979
\ No newline at end of file




More information about the Erp5-report mailing list