Commit b126075f authored by Christophe Dumez's avatar Christophe Dumez

- Fixed id of fieldset when the group name contains a space character

- Made Javascript to adjust left/right fieldsets height more intelligent (now detects fieldsets with 'left' or 'right' in the name, and raise no errors when left/right groups are missing)

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@9302 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d1aa42ad
No related merge requests found
......@@ -595,6 +595,10 @@ fieldset.bottom .field label {\n
font-weight: bold;\n
}\n
\n
.content .field .invisible {\n
display: None;\n
}\n
\n
.error,\n
.content .field .reqerror {\n
background-color: inherit;\n
......@@ -879,7 +883,7 @@ fieldset.bottom .field label {\n
border-width: 1px;\n
border-style: solid;\n
border-color: <dtml-var document_border_color>;\n
border-top: 0px none;\n
border-top: 0 none;\n
color: inherit;\n
background-color: <dtml-var document_background_color>;\n
padding: 5px;\n
......
......@@ -61,16 +61,40 @@ function submitAction(form,act) {\n
}\n
\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
var lh = 0;\n
var lfieldset;\n
var rh = 0;\n
var rfieldset;\n
var liste=document.getElementsByTagName(\'fieldset\');\n
for(i=0; i<liste.length; i=i+1){\n
list_parts = liste[i].id.split(\'_\');\n
for(j=1; j<list_parts.length; j=j+1){\n
if(list_parts[j] == "left"){\n
lfieldset = liste[i];\n
\tlh = lfieldset.offsetHeight;\n
break;\n
}else{\n
\tif(list_parts[j] == "right"){\n
\t rfieldset = liste[i];\n
\t rh = rfieldset.offsetHeight;\n
break;\n
\t}\n
}\n
}\n
if(lh && rh){\n
break;\n
}\n
}\n
if(lh && rh){\n
lfieldset.style.height=(lh>rh)? lh+"px" : rh+"px";\n
rfieldset.style.height=(lh>rh)? lh+"px" : rh+"px";\n
lfieldset.style.borderTop = \'1px solid #3D7474\';\n
lfieldset.style.borderLeft = \'1px solid #3D7474\';\n
lfieldset.style.borderBottom = \'1px solid #3D7474\';\n
rfieldset.style.borderTop = \'1px solid #3D7474\';\n
rfieldset.style.borderRight = \'1px solid #3D7474\';\n
rfieldset.style.borderBottom = \'1px solid #3D7474\';\n
}\n
}\n
......
......@@ -100,7 +100,7 @@ Groups names becomes "left_group", "right_group", "left1_group", "right1_group",
<tal:block metal:use-macro="template/macros/form" />\n
</tal:block>\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">\n
\t <fieldset tal:attributes="class group; id python: \'fieldset_\'+group.replace(\' \', \'_\')" tal:condition="python: group.find(\'hidden\') < 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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment