From fb56d333e1e68bf573748f330a03c86f3d5d2987 Mon Sep 17 00:00:00 2001
From: Fabien Morin <fabien@nexedi.com>
Date: Wed, 6 May 2009 07:56:51 +0000
Subject: [PATCH] remove some unused variable declaration. Declare variable
 used only gadget mode only in gadget case. This should make the page
 displaying a bit faster.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@26823 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../portal_skins/erp5_xhtml_style/ListBox_asHTML.xml     | 9 +++------
 .../erp5_xhtml_style/ListBox_asTableStyleHTML.xml        | 2 +-
 product/ERP5/bootstrap/erp5_xhtml_style/bt/revision      | 2 +-
 3 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/ListBox_asHTML.xml b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/ListBox_asHTML.xml
index e388414932..f4a72df0d5 100644
--- a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/ListBox_asHTML.xml
+++ b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/ListBox_asHTML.xml
@@ -62,11 +62,6 @@
               is_web_mode request/is_web_mode | nothing;\n
               list_style python:request.get(\'list_style\', is_web_mode and \'table\' or None);\n
               is_gadget_mode request/is_gadget_mode | nothing;\n
-              box_relative_url python: request.get(\'box_relative_url\', \'\');\n
-              box python: real_context.restrictedTraverse(box_relative_url); \n
-              box_id python: \'visual_\'+box.getId();\n
-              dom_id python: request.get(\'dom_id\',None) or box_id;\n
-              Base_translateString python: real_context.Base_translateString;\n
               ">\n
   <!-- ListBox starts here.  -->\n
   <input type="hidden" name="list_selection_name" value="default" tal:attributes="value selection_name" />\n
@@ -77,7 +72,9 @@
   \n
   <tal:block tal:condition="is_gadget_mode"\n
              tal:define="global box_relative_url python: request.get(\'box_relative_url\', \'\');\n
-                         global box_id python: \'visual_%s\' %box_relative_url.split(\'/\')[-1];">\n
+             global box python: real_context.restrictedTraverse(box_relative_url); \n
+             global box_id python: \'visual_%s\' %box_relative_url.split(\'/\')[-1];\n
+             global dom_id python: request.get(\'dom_id\',None) or box_id;">\n
     <input tal:condition="python:form_id" \n
           type="hidden" name="gadget_form_id"\n
           tal:attributes="value form_id" />\n
diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/ListBox_asTableStyleHTML.xml b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/ListBox_asTableStyleHTML.xml
index 076d088b01..cd011725c3 100644
--- a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/ListBox_asTableStyleHTML.xml
+++ b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/ListBox_asTableStyleHTML.xml
@@ -179,7 +179,7 @@
                               current_page_start python: (listbox_max_lines * (current_page - 1)) + 1;\n
                               current_page_stop  python: (total_line < current_page_max) and total_line or current_page_max;">\n
                                 <tal:block condition="python: total_line > 0"\n
-                                  tal:replace="structure python: Base_translateString(\'Results <em>${start} - ${stop}</em> of <em>${total}</em>.\', mapping=dict(start=current_page_start, stop=current_page_stop, total=total_line))"/>\n
+                                  tal:replace="structure python: real_context.Base_translateString(\'Results <em>${start} - ${stop}</em> of <em>${total}</em>.\', mapping=dict(start=current_page_start, stop=current_page_stop, total=total_line))"/>\n
               <span tal:condition="python: total_line == 0" class="warning" i18n:translate="" i18n:domain="ui">No result !</span>\n
                 </span>\n
             </caption>\n
diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision b/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision
index 45b1ccee23..6b9b650b30 100644
--- a/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision
+++ b/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision
@@ -1 +1 @@
-741
\ No newline at end of file
+744
\ No newline at end of file
-- 
2.30.9