diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/erp5.css.xml b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/erp5.css.xml index 972b542bbf0149d36ba20d7947a9009aa01980f0..2cbb4efe778755f59f7624650b7f3f281b948b92 100644 --- a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/erp5.css.xml +++ b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/erp5.css.xml @@ -361,7 +361,7 @@ along with this program; if not, write to the Free Software\n Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n */\n \n -input, textarea, select, button, body, div, span {\n +input, textarea, select, button, body, div, span, fieldset {\n font-family: <dtml-var font_family>;\n font-size: <dtml-var font_size>;\n margin: 0;\n @@ -381,11 +381,11 @@ img {\n border: 0;\n }\n \n -body, div, span {\n +body, div, span, fieldset {\n color: <dtml-var font_color>;\n }\n \n -div, span {\n +div, span, fieldset {\n background-color: inherit;\n }\n \n @@ -418,6 +418,7 @@ a:hover {\n text-decoration: underline;\n }\n \n +p.clear,\n h6.clear {\n height: 0;\n margin: 0;\n @@ -505,21 +506,80 @@ div.index_html table {\n \n .content .field {\n position: relative;\n + clear: left;\n }\n \n .content .figure {\n text-align: right;\n }\n \n -.content .left {\n - min-width: 50%;\n +.group_title {\n + display: none;\n +}\n +\n +div.left,\n +fieldset.left {\n + width: 50%;\n clear: left;\n float: left;\n + border: 0;\n + height: 100%;\n + border-style: solid;\n + border-width: 0;\n +/* border-top-width: 1px;\n + border-left-width: 1px;\n + border-bottom-width: 1px;\n + border-right-width: 0;*/\n + border-color: <dtml-var document_border_color>;\n + padding-top: 5px;\n + padding-bottom: 2px;\n + padding-left: 8px;\n + margin-right: -9px;\n }\n \n -.content .right {\n +div.right,\n +fieldset.right {\n float: left;\n width: 50%;\n + border: 0;\n + margin-left: -1px;\n + height: 100%;\n + border-style: solid;\n + border-width: 0;\n +/* border-top-width: 1px;\n + border-left-width: 0;\n + border-bottom-width: 1px;\n + border-right-width: 1px;*/\n + border-color: <dtml-var document_border_color>;\n + padding-top: 5px;\n + padding-bottom: 2px;\n +}\n +\n +div.center,\n +fieldset.center {\n + margin-top: 5px;\n + margin-bottom: 5px;\n + padding-bottom: 5px;\n + padding-top: 5px;\n + border-style: solid;\n + border-color: <dtml-var document_border_color>;\n + border-width: 1px;\n +}\n +\n +.document .content .top_group {\n + border-width: 1px;\n + border-style: solid;\n + padding: 5px;\n + margin-bottom: 5px;\n +}\n +\n +\n +fieldset.bottom {\n + border-width: 0;\n +}\n +\n +fieldset.bottom .field label {\n + display: none;\n }\n \n .content .field {\n @@ -844,14 +904,6 @@ div.index_html table {\n padding: 5px;\n }\n \n -.document .content .top_group,\n -.document .content .center {\n - border-width: 1px;\n - border-style: solid;\n - padding: 5px;\n - margin-bottom: 5px;\n -}\n -\n /* LISTBOX */\n /* FIXME:\n - listbox uses lots of IDs, but there can be more than one listbox in a page !\n @@ -891,6 +943,7 @@ div.index_html table {\n .ListContent {\n color: #000;\n background-color: <dtml-var document_background_color>;\n + padding-left: 1px;\n }\n \n .ListContent table {\n diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/erp5.js.xml b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/erp5.js.xml index 97a80b0684d17ec43e7580db798a01d24502153c..49cd9d81b5fac1d3653b1dc1c75230bcdb4dd372 100644 --- a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/erp5.js.xml +++ b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/erp5.js.xml @@ -36,7 +36,9 @@ </item> <item> <key> <string>raw</string> </key> - <value> <string>/*\n + <value> <string encoding="cdata"><![CDATA[ + +/*\n Copyright (c) 20xx-2006 Nexedi SARL and Contributors. All Rights Reserved.\n \n This program is Free Software; you can redistribute it and/or\n @@ -57,7 +59,22 @@ function submitAction(form,act) {\n form.action = act;\n form.submit();\n }\n -</string> </value> +\n +function fixLeftRightHeight(){\n + var lh=document.getElementById(\'fieldset_left\').offsetHeight;\n + var rh=document.getElementById(\'fieldset_right\').offsetHeight;\n + document.getElementById(\'fieldset_left\').style.height=(lh>rh)? lh+"px" : rh+"px";\n + document.getElementById(\'fieldset_right\').style.height=(lh>rh)? lh+"px" : rh+"px";\n + document.getElementById(\'fieldset_left\').style.borderTop = \'1px solid #3D7474\'\n + document.getElementById(\'fieldset_left\').style.borderLeft = \'1px solid #3D7474\'\n + document.getElementById(\'fieldset_left\').style.borderBottom = \'1px solid #3D7474\'\n + document.getElementById(\'fieldset_right\').style.borderTop = \'1px solid #3D7474\'\n + document.getElementById(\'fieldset_right\').style.borderRight = \'1px solid #3D7474\'\n + document.getElementById(\'fieldset_right\').style.borderBottom = \'1px solid #3D7474\'\n +}\n + + +]]></string> </value> </item> <item> <key> <string>title</string> </key> diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/form_render.xml b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/form_render.xml index c0a09f496f530e5c0535600e5e4047b2fb2823e9..d1a408b0ec492c27b1e5ce3ae72fe920505bb02e 100644 --- a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/form_render.xml +++ b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/form_render.xml @@ -95,45 +95,19 @@ Groups names becomes "left_group", "right_group", "left1_group", "right1_group", <tal:block metal:define-macro="master">\n <tal:block tal:define="field_errors python: request.get(\'field_errors\',{});\n dummy python: request.set(\'here\', here);\n - left_group python: form.get_fields_in_group(\'left\');\n - right_group python: form.get_fields_in_group(\'right\');\n - center_group python: form.get_fields_in_group(\'center\');\n - bottom_group python: form.get_fields_in_group(\'bottom\');">\n + groups python: form.get_groups();">\n <tal:block tal:define="template python: here.developper_shortcut_render">\n <tal:block metal:use-macro="template/macros/form" />\n </tal:block>\n - <div tal:condition="python: len(left_group) > 0 or len(right_group) > 0"\n - class="top_group">\n - <div tal:condition="python: len(left_group) > 0"\n - class="left">\n - <tal:block tal:repeat="field left_group">\n - <tal:block metal:use-macro="here/field_render/macros/field_render" />\n + <tal:block tal:repeat="group groups">\n +\t <fieldset tal:attributes="class group; id python: \'fieldset_\'+group" tal:condition="python: group.find(\'hidden\') < 0 and len(form.get_fields_in_group(group)) > 0">\n + <legend tal:content="group" class="group_title"/>\n + <tal:block tal:repeat="field python:form.get_fields_in_group(group)">\n + <tal:block metal:use-macro="here/field_render/macros/field_render"/>\n </tal:block>\n - </div>\n - <div tal:condition="python: len(right_group) > 0"\n - class="right">\n - <tal:block tal:repeat="field right_group">\n - <tal:block metal:use-macro="here/field_render/macros/field_render" />\n - </tal:block>\n - </div>\n - <h6 class="clear"> </h6>\n - </div>\n - <div tal:condition="python: len(center_group) > 0"\n - class="center">\n - <tal:block tal:repeat="field center_group">\n - <tal:block metal:use-macro="here/field_render/macros/field_render" />\n - </tal:block>\n - </div>\n - <div tal:condition="python: len(bottom_group) > 0"\n - class="bottom">\n - <tal:block tal:repeat="field bottom_group">\n - <tal:block tal:define="template python: here.developper_shortcut_render">\n - <tal:block metal:use-macro="template/macros/field" />\n - </tal:block>\n - <tal:block tal:define="value python:request.get(field.id, None)"\n - tal:replace="structure python:field.render(value, request)" />\n - </tal:block>\n - </div>\n + </fieldset>\n + <p tal:condition="python: group.find(\'right\') >= 0" class="clear"> </p>\n + </tal:block>\n </tal:block>\n </tal:block> diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/template_erp5_xhtml_style.xml b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/template_erp5_xhtml_style.xml index 789ea7cccf470556f6a671263b575dbbfa1f49da..2628ef9591ab7c45e5e3e55bde5cc24b3f9706f3 100644 --- a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/template_erp5_xhtml_style.xml +++ b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/template_erp5_xhtml_style.xml @@ -137,7 +137,7 @@ IDEAS:\n type="text/javascript"></script>\n </tal:block>\n </head>\n - <body>\n + <body onload="fixLeftRightHeight()">\n <!-- <tal:block tal:replace="structure request"/> -->\n <form id="main_form"\n tal:attributes="enctype form/enctype | nothing;\n diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/bt/change_log b/product/ERP5/bootstrap/erp5_xhtml_style/bt/change_log index d755f14057570347b6954d2c78a55c0ac5a93cb4..aa3bcc2d41354b40303e67bdd9599e6a45747585 100644 --- a/product/ERP5/bootstrap/erp5_xhtml_style/bt/change_log +++ b/product/ERP5/bootstrap/erp5_xhtml_style/bt/change_log @@ -1,3 +1,6 @@ +2006-08-21 Chris +* Made form_render code a lot lighter with same final result using a loop + 2006-08-02 Romain * Add documentation_view to fix Inspector with xhtml_style. diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision b/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision index c147342cbefa3ef64ade3ed72b63aa05906a1829..24af08a4875794564c5895aa8c9b664b2c78effe 100644 --- a/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision +++ b/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision @@ -1 +1 @@ -81 \ No newline at end of file +83 \ No newline at end of file diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/bt/version b/product/ERP5/bootstrap/erp5_xhtml_style/bt/version index b123147e2a162f34cf377f8b63d99b0e6f8887c2..ea710abb95bce0d9783e3160cccfdb3109eb34b7 100644 --- a/product/ERP5/bootstrap/erp5_xhtml_style/bt/version +++ b/product/ERP5/bootstrap/erp5_xhtml_style/bt/version @@ -1 +1 @@ -1.1 \ No newline at end of file +1.2 \ No newline at end of file