[Erp5-report] r20412 - in /erp5/trunk/bt5/erp5_pdf_editor: SkinTemplateItem/portal_skins/er...

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Apr 10 14:28:26 CEST 2008


Author: fabien
Date: Thu Apr 10 14:28:25 2008
New Revision: 20412

URL: http://svn.erp5.org?rev=20412&view=rev
Log:
2008-04-10 fabien
* add css class for div with no input inside. This is necessary to have a correct rendering of readOnly fields (non editable).
* remove string after '/>'. This is tipicaly time and date separator that make the field rendering position bad.
* replace some unused div with tal:block, this make html source code more clean

Modified:
    erp5/trunk/bt5/erp5_pdf_editor/SkinTemplateItem/portal_skins/erp5_pdf_editor/form_render_PDFeForm.xml
    erp5/trunk/bt5/erp5_pdf_editor/bt/change_log
    erp5/trunk/bt5/erp5_pdf_editor/bt/revision

Modified: erp5/trunk/bt5/erp5_pdf_editor/SkinTemplateItem/portal_skins/erp5_pdf_editor/form_render_PDFeForm.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_pdf_editor/SkinTemplateItem/portal_skins/erp5_pdf_editor/form_render_PDFeForm.xml?rev=20412&r1=20411&r2=20412&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_pdf_editor/SkinTemplateItem/portal_skins/erp5_pdf_editor/form_render_PDFeForm.xml (original)
+++ erp5/trunk/bt5/erp5_pdf_editor/SkinTemplateItem/portal_skins/erp5_pdf_editor/form_render_PDFeForm.xml Thu Apr 10 14:28:25 2008
@@ -148,12 +148,12 @@
                     output rendering as a single field.\n
                     UPDATE : with xhtml_style, this \n
                   </div>\n
-                  <div tal:condition="python:(not field_errors.has_key(field.id))"><!-- field has no error -->\n
+                  <div class="input" tal:attributes="class python: (\'<\' not in struct) and \'%s_class\' % name or \'\'" tal:condition="python:(not field_errors.has_key(field.id))"><!-- field has no error -->\n
                     <div tal:replace="structure struct"\n
                           tal:attributes="class string:${name}_class;\n
                           title field/title"/>\n
                   </div>\n
-                  <div tal:condition="python: field_errors.has_key(field.id)"><!-- field has errors-->\n
+                  <div class="input" tal:attributes="class python: (\'<\' not in struct) and \'%s_class\' % name or \'\'" tal:condition="python: field_errors.has_key(field.id)"><!-- field has errors-->\n
                     <div tal:replace="structure struct"\n
                     i18n:attributes="title"\n
                     tal:attributes="class string:${name}_class_error;\n
@@ -172,17 +172,19 @@
                     in the document before processing the next input\n
                   </div>\n
                   <tal:block tal:condition="python: \'hidden\' not in struct_input_div[1]">\n
-                    <div tal:define="struct_range python:range(struct_input_len)"\n
+                    <tal:block tal:define="struct_range python:range(struct_input_len)"\n
                           tal:repeat="struct_ind python:struct_range[1:]">\n
                       <div tal:condition="python:(not field_errors.has_key(field.id))"><!-- field has no error 1-->\n
                         <div tal:define="struct_content python:struct_input_div[struct_ind];\n
+                          struct_content python:\'/>\'in struct_content and struct_content[:struct_content.rfind(\'/>\')+2] or struct_content;\n
                                                         struct_final python:\'%s %s\' %\n
                                                         (\'<input \', struct_content);\n
                                                         class_final python:\'%s%s%s\' %\n
                                                         (class_base,\'_class_\', struct_ind)"\n
                               tal:replace="structure struct_final"\n
                               tal:attributes="class class_final;\n
-                                              title field/title"/>\n
+                                              title field/title">\n
+                        </div>\n
                       </div>\n
                       <div tal:condition="python:field_errors.has_key(field.id)"><!-- field has errors 1-->\n
                         <div tal:define="struct_content python:struct_input_div[struct_ind];\n
@@ -195,13 +197,13 @@
                               tal:attributes="class class_final;\n
                               title field/title"/>\n
                       </div>\n
-                    </div>\n
+                    </tal:block>\n
                   </tal:block>\n
                   <tal:block tal:condition="python: \'hidden\' in struct_input_div[1]">\n
                     <!-- processing CheckBoxField in xhtml_style -->\n
                     <div tal:define="struct_range python:range(struct_input_len)"\n
                           tal:repeat="struct_ind python:struct_range[1:]">\n
-                      <div tal:condition="python:(not field_errors.has_key(field.id))">\n
+                      <tal:block tal:condition="python:(not field_errors.has_key(field.id))">\n
                         <!-- field has no error 2-->\n
                         <div tal:define="struct_content python:struct_input_div[struct_ind];\n
                                           struct_final python:\'%s %s\' %\n
@@ -211,8 +213,8 @@
                                           tal:replace="structure struct_final"\n
                                           tal:attributes="class class_final;\n
                                           title field/title"/>\n
-                      </div>\n
-                      <div tal:condition="python:field_errors.has_key(field.id)">\n
+                      </tal:block>\n
+                      <tal:block tal:condition="python:field_errors.has_key(field.id)">\n
                         <!-- field has errors 2-->\n
                         <div tal:define="struct_content python:struct_input_div[struct_ind];\n
                                           struct_final python:\'%s %s\' %\n
@@ -222,7 +224,7 @@
                               tal:replace="structure struct_final"\n
                               tal:attributes="class class_final;\n
                               title field/title"/>\n
-                      </div>\n
+                      </tal:block>\n
                     </div>\n
                   </tal:block>\n
                 </div>\n

Modified: erp5/trunk/bt5/erp5_pdf_editor/bt/change_log
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_pdf_editor/bt/change_log?rev=20412&r1=20411&r2=20412&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_pdf_editor/bt/change_log (original)
+++ erp5/trunk/bt5/erp5_pdf_editor/bt/change_log Thu Apr 10 14:28:25 2008
@@ -1,3 +1,9 @@
+2008-04-10 fabien
+* add css class for div with no input inside. This is necessary to have a correct rendering of readOnly fields (non editable).
+* remove string after '/>'. This is tipicaly time and date separator that make the field rendering position bad.
+* replace some unused div with tal:block, this make html source code more clean
+
+
 2008-03-31 fabien
 * add update_module_scribus portal action that permit to update the forms of a module created using the create_module_scribus action
 

Modified: erp5/trunk/bt5/erp5_pdf_editor/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_pdf_editor/bt/revision?rev=20412&r1=20411&r2=20412&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_pdf_editor/bt/revision (original)
+++ erp5/trunk/bt5/erp5_pdf_editor/bt/revision Thu Apr 10 14:28:25 2008
@@ -1,1 +1,1 @@
-24
+26




More information about the Erp5-report mailing list