Commit 6b5eaabc authored by Fabien Morin's avatar Fabien Morin

there was a mistake in r34739, just fix it.

Using id change a bit the behaviour and can bring new small ambiguities :
- If the web developer create manually a fieldset containing one of the class ('right', 'left'), the javascript will try to create the table containing the fieldset
- if the web developer create a fieldset with name 'center_left' and an extra class 'right'  (using parenthesis in the group name), the javascript will position the fieldset on the right side.
This cases should be very rare (second one is like a mistake). This problem could be avoided by changing template and css to not use javasacript to position elements (I think that this could be made using pure HTML + CSS).

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@34799 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0bfe64f0
......@@ -149,26 +149,14 @@ function buildTables(element_list, rowPredicate, columnPredicate,\n
}\n
}\n
\n
function matchChunk(string, separator, chunk_value) {\n
if (string != null) {\n
var chunk_list = string.split(separator);\n
var i;\n
for (i = 0; i < chunk_list.length; i++) {\n
if (chunk_list[i] == chunk_value)\n
return true;\n
}\n
}\n
return false;\n
}\n
\n
function matchLeftFieldset(element) {\n
return (element.tagName == "FIELDSET") &&\n
matchChunk(element.className, \' \', "left");\n
return (element.tagName == "FIELDSET" &&\n
element.className.toLowerCase().indexOf(\'left\') != -1)\n
}\n
\n
function matchRightFieldset(element, ignored) {\n
if ((element.tagName == "FIELDSET") &&\n
matchChunk(element.className, \' \', "right"))\n
if (element.tagName == "FIELDSET" &&\n
element.className.toLowerCase().indexOf(\'right\') != -1)\n
return 7; /* End row, table and use element */\n
return 0;\n
}\n
......
931
\ No newline at end of file
933
\ 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