Commit 51e98c26 authored by Vincent Pelletier's avatar Vincent Pelletier

Call only once in a page rendering the functions used to decide wether to...

Call only once in a page rendering the functions used to decide wether to render or not developer mode & translator mode buttons.
Remove "view rendered" developper mode button.
Define the a new css property to define the group border color.
Fix "no space between fields" bug (#491).
Fix "no space between left-right group and bottom group when there is no center group" (#490).
Fix "font size of breadcrumb, tab, listbox title text is not smaller than content font" (#489).
Fix "no space between breadcrumb and listbox in list mode" (#489).
Fix padding of group fields.
Fix left group with no border when right group is not present.
Fix bottom border of context bar color.
Fix border color of field groups.
Cleanup redundancy in CSS and explain margin values.
Fix french variable name in javascript.
Fix tabs used in javascript.
Move hardcoded style values from javascript to css.
Update quad_form_view to follow form_view changes (use fieldsets).

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@10433 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b9c8959c
...@@ -75,18 +75,20 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n ...@@ -75,18 +75,20 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
\n \n
\n \n
<tal:block metal:define-macro="edit_link">\n <tal:block metal:define-macro="edit_link">\n
<a tal:condition="python: hasattr(object, \'meta_type\') and context.Base_getSourceVisibility(object)"\n <a tal:condition="python: preferred_html_style_developper_mode and hasattr(object, \'meta_type\')"\n
tal:attributes="href python: \'%s/%s\' % (\'/\'.join(object.getPhysicalPath()[len(object.getPortalObject().getPhysicalPath()):]), manage) # XXX: quick hack to get path;\n tal:attributes="href python: \'%s/%s\' % (\'/\'.join(object.getPhysicalPath()[len(object.getPortalObject().getPhysicalPath()):]), manage) # XXX: quick hack to get path;\n
title info;"><img tal:attributes="src python: \'images/%s\' % (image, );\n title info;"><img tal:attributes="src python: \'images/%s\' % (image, );\n
alt info;"/></a>\n alt info;"/></a>\n
</tal:block>\n </tal:block>\n
\n \n
\n \n
<tal:block metal:define-macro="translate_link" tal:define="image image | python: \'translate.png\'">\n <tal:block metal:define-macro="translate_link">\n
<a tal:condition="python: here.Base_getTranslationVisibility()"\n <tal:block tal:condition="preferred_html_style_translator_mode">\n
tal:attributes="href python: \'%s/manage_messages?regex=^%s%%24&amp;lang=%s\' % (\'/\'.join(here.Localizer.erp5_ui.getPhysicalPath()[len(here.Localizer.erp5_ui.getPortalObject().getPhysicalPath()):]), message, here.Localizer.get_selected_language());\n <a tal:define="image image | python: \'translate.png\'"\n
title info;"><img tal:attributes="src python: \'images/%s\' % (image, );\n tal:attributes="href python: \'%s/manage_messages?regex=^%s%%24&amp;lang=%s\' % (\'/\'.join(here.Localizer.erp5_ui.getPhysicalPath()[len(here.Localizer.erp5_ui.getPortalObject().getPhysicalPath()):]), message, here.Localizer.get_selected_language());\n
alt info;"/></a>\n title info;"><img tal:attributes="src python: \'images/%s\' % (image, );\n
alt info;"/></a>\n
</tal:block>\n
</tal:block>\n </tal:block>\n
\n \n
\n \n
...@@ -97,12 +99,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n ...@@ -97,12 +99,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
manage python: \'manage\'">\n manage python: \'manage\'">\n
<tal:block metal:use-macro="template/macros/edit_link"/>\n <tal:block metal:use-macro="template/macros/edit_link"/>\n
</tal:block>\n </tal:block>\n
<tal:block tal:define="image python: \'editformrenderer.png\';\n
info python: \'Edit this form\\\'s renderer\';\n
object python: getattr(here, form.pt, None);\n
manage python: \'manage_main\'">\n
<tal:block metal:use-macro="template/macros/edit_link"/>\n
</tal:block>\n
<tal:block tal:define="image python: \'editformaction.png\';\n <tal:block tal:define="image python: \'editformaction.png\';\n
info python: \'Edit this form\\\'s action\';\n info python: \'Edit this form\\\'s action\';\n
object python: getattr(here, form.action, None);\n object python: getattr(here, form.action, None);\n
...@@ -124,14 +120,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n ...@@ -124,14 +120,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
image python: \'translate.png\'">\n image python: \'translate.png\'">\n
<tal:block metal:use-macro="template/macros/translate_link"/>\n <tal:block metal:use-macro="template/macros/translate_link"/>\n
</tal:block>\n </tal:block>\n
<tal:block tal:define="desc python: here.Base_getFieldDescription(field)">\n <tal:block tal:define="message python: here.Base_getFieldDescription(field);\n
<tal:block tal:condition="python: desc not in (None, \'\')">\n info python: \'Translate this field description\';\n
<tal:block tal:define="info python: \'Translate this field description\';\n image python: \'translate_tooltip.png\'"\n
message desc;\n tal:condition="python: message not in (None, \'\')">\n
image python: \'translate_tooltip.png\'">\n <tal:block metal:use-macro="template/macros/translate_link"/>\n
<tal:block metal:use-macro="template/macros/translate_link"/>\n
</tal:block>\n
</tal:block>\n
</tal:block>\n </tal:block>\n
</tal:block> </tal:block>
......
...@@ -256,6 +256,16 @@ ...@@ -256,6 +256,16 @@
<value> <string>string</string> </value> <value> <string>string</string> </value>
</item> </item>
</dictionary> </dictionary>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>group_border_color</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
</tuple> </tuple>
</value> </value>
</item> </item>
...@@ -315,6 +325,10 @@ ...@@ -315,6 +325,10 @@
<dictionary/> <dictionary/>
</value> </value>
</item> </item>
<item>
<key> <string>group_border_color</string> </key>
<value> <string>#7EC1C1</string> </value>
</item>
<item> <item>
<key> <string>link_color</string> </key> <key> <string>link_color</string> </key>
<value> <string>#002e3f</string> </value> <value> <string>#002e3f</string> </value>
...@@ -345,7 +359,7 @@ ...@@ -345,7 +359,7 @@
</item> </item>
<item> <item>
<key> <string>main_border_color</string> </key> <key> <string>main_border_color</string> </key>
<value> <string>#7EC1C1</string> </value> <value> <string>#97B0C1</string> </value>
</item> </item>
<item> <item>
<key> <string>navigation_bar_background_color</string> </key> <key> <string>navigation_bar_background_color</string> </key>
...@@ -548,55 +562,50 @@ div.index_html table {\n ...@@ -548,55 +562,50 @@ div.index_html table {\n
display: none;\n display: none;\n
}\n }\n
\n \n
div.left,\n div.top_group,\n
fieldset.left,\n
fieldset.right,\n
fieldset.center,\n
fieldset.bottom {\n
margin-bottom: 5px;\n
}\n
\n
div.top_group,\n
fieldset.left,\n
fieldset.right,\n
fieldset.center {\n
border-style: solid;\n
border-width: 1px;\n
border-color: <dtml-var group_border_color>;\n
padding-top: 5px;\n
padding-left: 5px;\n
padding-right: 5px;\n
}\n
\n
fieldset.left {\n fieldset.left {\n
width: 50%;\n width: 50%;\n
clear: left;\n
float: left;\n float: left;\n
border: 0;\n margin-right: -11px; /* 5px margin *2 + 1px for left border width */\n
height: 100%;\n
border-style: solid;\n
border-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
\n \n
div.right,\n
fieldset.right {\n fieldset.right {\n
float: left;\n
width: 50%;\n width: 50%;\n
border: 0;\n float: left;\n
margin-left: -1px;\n margin-left: -11px; /* 5px margin *2 + 1px for right border width */\n
height: 100%;\n
border-style: solid;\n
border-width: 0;\n
border-color: <dtml-var document_border_color>;\n
padding-top: 5px;\n
padding-bottom: 2px;\n
}\n }\n
\n \n
div.center,\n div.top_group fieldset.left,\n
fieldset.center {\n div.top_group fieldset.right {\n
margin-top: 5px;\n border-width: 0;\n
margin-bottom: 5px;\n padding: 0;\n
padding-bottom: 5px;\n width: 50%;\n
padding-top: 5px;\n
border-style: solid;\n
border-color: <dtml-var document_border_color>;\n
border-width: 1px;\n
}\n }\n
\n \n
.document .content .top_group {\n fieldset.center,\n
border-width: 1px;\n fieldset.bottom {\n
border-style: solid;\n clear: both;\n
padding: 5px;\n
margin-bottom: 5px;\n
}\n }\n
\n \n
\n
fieldset.bottom {\n fieldset.bottom {\n
border-width: 0;\n border-width: 0;\n
}\n }\n
...@@ -606,7 +615,7 @@ fieldset.bottom .field label {\n ...@@ -606,7 +615,7 @@ fieldset.bottom .field label {\n
}\n }\n
\n \n
.content .field {\n .content .field {\n
padding-bottom: 0.2em;\n padding-bottom: 5px;\n
}\n }\n
\n \n
.content .field label {\n .content .field label {\n
...@@ -813,6 +822,8 @@ fieldset.bottom .field label {\n ...@@ -813,6 +822,8 @@ fieldset.bottom .field label {\n
\n \n
#breadcrumb {\n #breadcrumb {\n
float: left;\n float: left;\n
font-size: 90%;\n
margin-bottom: 5px;\n
}\n }\n
\n \n
#breadcrumb a {\n #breadcrumb a {\n
...@@ -821,10 +832,12 @@ fieldset.bottom .field label {\n ...@@ -821,10 +832,12 @@ fieldset.bottom .field label {\n
\n \n
#logged_in_as {\n #logged_in_as {\n
float: right;\n float: right;\n
font-size: 90%;\n
}\n }\n
\n \n
#logged_in_as .logged_txt{\n #logged_in_as .logged_txt{\n
color: <dtml-var link_color>;\n color: <dtml-var link_color>;\n
font-size: 90%;\n
}\n }\n
\n \n
#transition_message {\n #transition_message {\n
...@@ -903,6 +916,7 @@ fieldset.bottom .field label {\n ...@@ -903,6 +916,7 @@ fieldset.bottom .field label {\n
color: inherit;\n color: inherit;\n
background-color: inherit;\n background-color: inherit;\n
background: url(\'<dtml-var expr="portal_url.getPortalPath()">/images/tab_right.png\') top right no-repeat;\n background: url(\'<dtml-var expr="portal_url.getPortalPath()">/images/tab_right.png\') top right no-repeat;\n
font-size: 90%;\n
}\n }\n
\n \n
.document .actions li.selected a {\n .document .actions li.selected a {\n
...@@ -937,6 +951,10 @@ fieldset.bottom .field label {\n ...@@ -937,6 +951,10 @@ fieldset.bottom .field label {\n
padding-left: 10px;\n padding-left: 10px;\n
}\n }\n
\n \n
.ListSummary * {\n
font-size: 90%;\n
}\n
\n
.ListSummary table {\n .ListSummary table {\n
width: 100%;\n width: 100%;\n
border-color: <dtml-var document_border_color>;\n border-color: <dtml-var document_border_color>;\n
...@@ -978,6 +996,7 @@ fieldset.bottom .field label {\n ...@@ -978,6 +996,7 @@ fieldset.bottom .field label {\n
.ListContent #listbox_label_line {\n .ListContent #listbox_label_line {\n
color: <dtml-var font_color>;\n color: <dtml-var font_color>;\n
background-color: <dtml-var listbox_label_background_color>;\n background-color: <dtml-var listbox_label_background_color>;\n
font-size: 90%;\n
}\n }\n
\n \n
.ListContent #listbox_stat_line {\n .ListContent #listbox_stat_line {\n
......
...@@ -65,20 +65,20 @@ function fixLeftRightHeight(){\n ...@@ -65,20 +65,20 @@ function fixLeftRightHeight(){\n
var lfieldset;\n var lfieldset;\n
var rh = 0;\n var rh = 0;\n
var rfieldset;\n var rfieldset;\n
var liste=document.getElementsByTagName(\'fieldset\');\n var list=document.getElementsByTagName(\'fieldset\');\n
for(i=0; i<liste.length; i=i+1){\n for(i=0; i<list.length; i=i+1){\n
list_parts = liste[i].id.split(\'_\');\n list_parts = list[i].id.split(\'_\');\n
for(j=1; j<list_parts.length; j=j+1){\n for(j=1; j<list_parts.length; j=j+1){\n
if(list_parts[j] == "left"){\n if(list_parts[j] == "left"){\n
lfieldset = liste[i];\n lfieldset = list[i];\n
\tlh = lfieldset.offsetHeight;\n lh = lfieldset.offsetHeight;\n
break;\n break;\n
}else{\n }else{\n
\tif(list_parts[j] == "right"){\n if(list_parts[j] == "right"){\n
\t rfieldset = liste[i];\n rfieldset = list[i];\n
\t rh = rfieldset.offsetHeight;\n rh = rfieldset.offsetHeight;\n
break;\n break;\n
\t}\n }\n
}\n }\n
}\n }\n
if(lh && rh){\n if(lh && rh){\n
...@@ -86,14 +86,10 @@ function fixLeftRightHeight(){\n ...@@ -86,14 +86,10 @@ function fixLeftRightHeight(){\n
}\n }\n
}\n }\n
if(lh && rh){\n if(lh && rh){\n
lfieldset.style.height=(lh>rh)? lh+"px" : rh+"px";\n lfieldset.style.height = (lh>rh)? lh+"px" : rh+"px";\n
rfieldset.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.borderRightWidth = 0;\n
lfieldset.style.borderLeft = \'1px solid #3D7474\';\n rfieldset.style.borderLeftWidth = 0;\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
}\n }\n
......
...@@ -92,6 +92,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n ...@@ -92,6 +92,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
class="error"\n class="error"\n
tal:content="python: field_errors[field.id].error_text"\n tal:content="python: field_errors[field.id].error_text"\n
i18n:translate="" i18n:domain="ui"/>\n i18n:translate="" i18n:domain="ui"/>\n
<p class="clear"></p>\n
</div>\n </div>\n
</tal:block>\n </tal:block>\n
</tal:block> </tal:block>
......
...@@ -72,6 +72,8 @@ ...@@ -72,6 +72,8 @@
dummy python: http_parameter_list.update(local_parameter_list);\n dummy python: http_parameter_list.update(local_parameter_list);\n
global http_parameters python: here.ERP5XhtmlStyle_renderHTTPParameterList(http_parameter_list);\n global http_parameters python: here.ERP5XhtmlStyle_renderHTTPParameterList(http_parameter_list);\n
global form nocall:form | nothing;\n global form nocall:form | nothing;\n
global preferred_html_style_developper_mode here/portal_preferences/getPreferredHtmlStyleDevelopperMode;\n
global preferred_html_style_translator_mode here/portal_preferences/getPreferredHtmlStyleTranslatorMode;\n
"/>\n "/>\n
</tal:block>\n </tal:block>\n
\n \n
......
...@@ -85,44 +85,44 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n ...@@ -85,44 +85,44 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
<tal:block metal:use-macro="template/macros/form" />\n <tal:block metal:use-macro="template/macros/form" />\n
</tal:block>\n </tal:block>\n
<div tal:condition="python: len(left_group) > 0 or len(right_group) > 0"\n <div tal:condition="python: len(left_group) > 0 or len(right_group) > 0"\n
class="top_group">\n class="top_group">\n
<div tal:condition="python: len(left_group) > 0"\n <fieldset tal:condition="python: len(left_group) > 0"\n
class="left">\n class="left">\n
<tal:block tal:repeat="field left_group">\n <tal:block tal:repeat="field left_group">\n
<tal:block metal:use-macro="here/field_render/macros/field_render" />\n <tal:block metal:use-macro="here/field_render/macros/field_render" />\n
</tal:block>\n </tal:block>\n
</div>\n </fieldset>\n
<div tal:condition="python: len(right_group) > 0"\n <fieldset tal:condition="python: len(right_group) > 0"\n
class="right">\n class="right">\n
<tal:block tal:repeat="field right_group">\n <tal:block tal:repeat="field right_group">\n
<tal:block metal:use-macro="here/field_render/macros/field_render" />\n <tal:block metal:use-macro="here/field_render/macros/field_render" />\n
</tal:block>\n </tal:block>\n
</div>\n </fieldset>\n
<p class="clear"></p>\n <p class="clear"></p>\n
</div>\n </div>\n
<div tal:condition="python: len(center_left_group) > 0 or len(center_right_group) > 0"\n <div tal:condition="python: len(center_left_group) > 0 or len(center_right_group) > 0"\n
class="top_group">\n class="top_group">\n
<div tal:condition="python: len(center_left_group) > 0"\n <fieldset tal:condition="python: len(center_left_group) > 0"\n
class="left">\n class="left">\n
<tal:block tal:repeat="field center_left_group">\n <tal:block tal:repeat="field center_left_group">\n
<tal:block metal:use-macro="here/field_render/macros/field_render" />\n <tal:block metal:use-macro="here/field_render/macros/field_render" />\n
</tal:block>\n </tal:block>\n
</div>\n </fieldset>\n
<div tal:condition="python: len(center_right_group) > 0"\n <fieldset tal:condition="python: len(center_right_group) > 0"\n
class="right">\n class="right">\n
<tal:block tal:repeat="field center_right_group">\n <tal:block tal:repeat="field center_right_group">\n
<tal:block metal:use-macro="here/field_render/macros/field_render" />\n <tal:block metal:use-macro="here/field_render/macros/field_render" />\n
</tal:block>\n </tal:block>\n
</div>\n </fieldset>\n
<p class="clear"></p>\n <p class="clear"></p>\n
</div>\n </div>\n
<div tal:condition="python: len(bottom_group) > 0"\n <fieldset tal:condition="python: len(bottom_group) > 0"\n
class="bottom">\n class="center">\n
<tal:block tal:repeat="field python: form.get_fields_in_group(\'bottom\')">\n <tal:block tal:repeat="field python: form.get_fields_in_group(\'bottom\')">\n
<tal:block metal:use-macro="here/field_render/macros/field_render" />\n <tal:block metal:use-macro="here/field_render/macros/field_render" />\n
</tal:block>\n </tal:block>\n
<p class="clear"></p>\n <p class="clear"></p>\n
</div>\n </fieldset>\n
</tal:block>\n </tal:block>\n
</tal:block>\n </tal:block>\n
</tal:block> </tal:block>
......
222 235
\ No newline at end of file \ 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