Commit a3addb4c authored by Kevin Deldycke's avatar Kevin Deldycke

* Render field CSS classes on the div.field instead on the label for better styling.

* Fix JP "missing" statement.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@9728 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 45c469ee
......@@ -618,24 +618,23 @@ fieldset.bottom .field label {\n
float: left;\n
}\n
\n
.content .field .input a{\n
.content .field .input a {\n
vertical-align: middle;\n
}\n
\n
.content .field .required,\n
.content .field .reqerror {\n
.content .field.reqerror label,\n
.content .field.required label,\n
.content .field .error {\n
font-weight: bold;\n
}\n
\n
\n
.content .field label.invisible {\n
display: None;\n
.content .field .error {\n
background-color: inherit;\n
color: #f00;\n
}\n
\n
.error,\n
.content .field .reqerror {\n
background-color: inherit;\n
color: #F00;\n
.content .field.invisible label {\n
display: None;\n
}\n
\n
.login .submit {\n
......@@ -669,8 +668,8 @@ fieldset.bottom .field label {\n
\n
#status,\n
#master {\n
padding-left: 0.5em;\n
padding-right: 0.5em;\n
padding-left: .5em;\n
padding-right: .5em;\n
}\n
\n
/* Context bar */\n
......@@ -828,7 +827,7 @@ fieldset.bottom .field label {\n
\n
#transition_message {\n
margin-left: 1em;\n
color: #F00;\n
color: #f00;\n
background-color: inherit;\n
font-weight: bold;\n
}\n
......@@ -841,12 +840,12 @@ fieldset.bottom .field label {\n
border-width: 1px;\n
border-style: solid;\n
border-color: <dtml-var dialog_border_color>;\n
padding: 0.5em;\n
padding: .5em;\n
margin-bottom: 1em;\n
}\n
\n
.list_dialog {\n
margin-bottom: 0.5em;\n
margin-bottom: .5em;\n
}\n
\n
.dialog_selector button .description {\n
......
......@@ -70,35 +70,30 @@ GNU General Public License for more details.\n
You should have received a copy of the GNU General Public License\n
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
--></tal:block>\n
\n
MISSING\n
(jp) - way to decide when to display and when not to display a label\n
(jp) - is CSS really handled ?\n
-->\n
</tal:block>\n
<tal:block metal:define-macro="field_render">\n
<tal:block tal:define="value python:request.get(field.id, None);\n
field_errors python: request.get(\'field_errors\',{})">\n
<tal:block tal:define="html_render python: field.render_htmlgrid(value, request)">\n
<tal:block tal:condition="python:field.meta_type != \'HiddenStringField\'">\n
<div tal:repeat="html_tuple html_render" class="field"\n
tal:attributes="title python: here.Localizer.translate(\'erp5_ui\', here.Base_getFieldDescription(field))">\n
<label tal:attributes="class python: ({0: {0: None, 1: \'required\'},\n
1: {0: \'error\', 1: \'reqerror\'}}[field_errors.has_key(field.id)][field.is_required()] or \'\') + \' \' + (field.get_value(\'css_class\') or \'\')">\n
<tal:block tal:content="structure python: html_tuple[0]"\n
i18n:translate="" i18n:domain="ui" />\n
<tal:block tal:define="template python: here.developper_shortcut_render">\n
<tal:block metal:use-macro="template/macros/field" />\n
</tal:block>\n
</label>\n
<div class="input" tal:content="structure python: html_tuple[1]"/>\n
<span tal:condition="python: field_errors.has_key(field.id)"\n
class="error"\n
tal:content="python: field_errors[field.id].error_text"\n
i18n:translate="" i18n:domain="ui"/>\n
</div>\n
</tal:block>\n
</tal:block>\n
<tal:block tal:condition="python: field.meta_type != \'HiddenStringField\'"\n
tal:define="value python: request.get(field.id, None);\n
field_errors python: request.get(\'field_errors\', {});\n
html_render python: field.render_htmlgrid(value, request)">\n
<div tal:repeat="html_tuple html_render"\n
tal:attributes="title python: here.Localizer.translate(\'erp5_ui\', here.Base_getFieldDescription(field));\n
class python: \'field \' + ({0: {0: None , 1: \'required\'},\n
1: {0: \'error\', 1: \'reqerror\'}}[field_errors.has_key(field.id)][field.is_required()] or \'\') + \' \' + (field.get_value(\'css_class\') or \'\')">\n
<label>\n
<tal:block tal:content="structure python: html_tuple[0]"\n
i18n:translate="" i18n:domain="ui"/>\n
<tal:block tal:define="template python: here.developper_shortcut_render">\n
<tal:block metal:use-macro="template/macros/field"/>\n
</tal:block>\n
</label>\n
<div class="input" tal:content="structure python: html_tuple[1]"/>\n
<span tal:condition="python: field_errors.has_key(field.id)"\n
class="error"\n
tal:content="python: field_errors[field.id].error_text"\n
i18n:translate="" i18n:domain="ui"/>\n
</div>\n
</tal:block>\n
</tal:block>
......
2006-09-07 Kevin
* Render field CSS classes on the div.field instead on the label for better styling.
* Fix JP "missing" statement.
2006-09-04 Kevin
* Don't render non-editable fields in span.
......
160
\ No newline at end of file
166
\ No newline at end of file
1.2.24
\ No newline at end of file
1.2.25
\ No newline at end of file
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