Commit 6125d625 authored by Fabien Morin's avatar Fabien Morin

remove the use of id as it is useless (everything can be done using field type...

remove the use of id as it is useless (everything can be done using field type and class) and make html page not valid. It's a bad habit to use id, in most of the case, class should be used instead.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@34739 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e311680c
...@@ -151,10 +151,10 @@ function buildTables(element_list, rowPredicate, columnPredicate,\n ...@@ -151,10 +151,10 @@ function buildTables(element_list, rowPredicate, columnPredicate,\n
\n \n
function matchChunk(string, separator, chunk_value) {\n function matchChunk(string, separator, chunk_value) {\n
if (string != null) {\n if (string != null) {\n
var id_chunks = string.split(separator);\n var chunk_list = string.split(separator);\n
var i;\n var i;\n
for (i = 0; i < id_chunks.length; i++) {\n for (i = 0; i < chunk_list.length; i++) {\n
if (id_chunks[i] == chunk_value)\n if (chunk_list[i] == chunk_value)\n
return true;\n return true;\n
}\n }\n
}\n }\n
...@@ -163,12 +163,12 @@ function matchChunk(string, separator, chunk_value) {\n ...@@ -163,12 +163,12 @@ function matchChunk(string, separator, chunk_value) {\n
\n \n
function matchLeftFieldset(element) {\n function matchLeftFieldset(element) {\n
return (element.tagName == "FIELDSET") &&\n return (element.tagName == "FIELDSET") &&\n
matchChunk(element.id, \'_\', "left");\n matchChunk(element.className, \' \', "left");\n
}\n }\n
\n \n
function matchRightFieldset(element, ignored) {\n function matchRightFieldset(element, ignored) {\n
if ((element.tagName == "FIELDSET") &&\n if ((element.tagName == "FIELDSET") &&\n
matchChunk(element.id, \'_\', "right"))\n matchChunk(element.className, \' \', "right"))\n
return 7; /* End row, table and use element */\n return 7; /* End row, table and use element */\n
return 0;\n return 0;\n
}\n }\n
......
...@@ -113,8 +113,7 @@ ...@@ -113,8 +113,7 @@
<tal:block tal:repeat="group group_list">\n <tal:block tal:repeat="group group_list">\n
<tal:block tal:define="gid group/gid">\n <tal:block tal:define="gid group/gid">\n
<fieldset tal:condition="python: \'hidden\' not in gid and \'bottom\' not in gid and \'head\' not in gid"\n <fieldset tal:condition="python: \'hidden\' not in gid and \'bottom\' not in gid and \'head\' not in gid"\n
tal:attributes="class gid;\n tal:attributes="class gid;">\n
id python: \'fieldset_\' + gid.replace(\' \', \'_\');">\n
<legend tal:content="group/gtitle" class="group_title" />\n <legend tal:content="group/gtitle" class="group_title" />\n
<tal:block tal:repeat="field python: form.get_fields_in_group(group[\'goid\'])">\n <tal:block tal:repeat="field python: form.get_fields_in_group(group[\'goid\'])">\n
<tal:block metal:use-macro="field_render" />\n <tal:block metal:use-macro="field_render" />\n
...@@ -154,7 +153,8 @@ ...@@ -154,7 +153,8 @@
\n \n
</tal:block>\n </tal:block>\n
</tal:block>\n </tal:block>\n
</tal:block> </tal:block>\n
]]></string> </value> ]]></string> </value>
</item> </item>
......
...@@ -79,8 +79,7 @@ It is possible to specify a group id and a group title by naming a group followi ...@@ -79,8 +79,7 @@ It is possible to specify a group id and a group title by naming a group followi
<tal:block tal:repeat="group group_list">\n <tal:block tal:repeat="group group_list">\n
<tal:block tal:define="gid group/gid;">\n <tal:block tal:define="gid group/gid;">\n
<fieldset tal:condition="python: gid.find(\'hidden\') &lt; 0"\n <fieldset tal:condition="python: gid.find(\'hidden\') &lt; 0"\n
tal:attributes="class python:gid + test(request.get(\'editable_mode\', 0), \' editable\', \' viewable\');\n tal:attributes="class python:gid + test(request.get(\'editable_mode\', 0), \' editable\', \' viewable\');">\n
id python: \'fieldset_%s\' % (gid.replace(\' \', \'_\'), );">\n
<legend i18n:translate="" i18n:domain="ui" tal:condition="group/gtitle" tal:content="group/gtitle" class="group_title"></legend>\n <legend i18n:translate="" i18n:domain="ui" tal:condition="group/gtitle" tal:content="group/gtitle" class="group_title"></legend>\n
<tal:block tal:repeat="field python: form.get_fields_in_group(group[\'goid\'])">\n <tal:block tal:repeat="field python: form.get_fields_in_group(group[\'goid\'])">\n
<tal:block metal:use-macro="field_render" />\n <tal:block metal:use-macro="field_render" />\n
......
930 931
\ 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