Commit 24a06257 authored by Jérome Perrin's avatar Jérome Perrin

Only apply the listfield indentation if the option starts with  

Take into account r34963, the first character can be \n

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@34967 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent cfa45fd8
...@@ -304,6 +304,9 @@ var rewriteIndentedSelect = function() {\n ...@@ -304,6 +304,9 @@ var rewriteIndentedSelect = function() {\n
continue;\n continue;\n
}\n }\n
text = options[j].innerHTML;\n text = options[j].innerHTML;\n
if (text.substring(0, 1) == \'\\n\') {\n
text = text.substring(1, text.length);\n
}\n
level = 0;\n level = 0;\n
if (text.substring(0, 6) == \' \') {\n if (text.substring(0, 6) == \' \') {\n
for (idx=0; idx <= text.length; idx+=6) {\n for (idx=0; idx <= text.length; idx+=6) {\n
...@@ -314,10 +317,11 @@ var rewriteIndentedSelect = function() {\n ...@@ -314,10 +317,11 @@ var rewriteIndentedSelect = function() {\n
}\n }\n
}\n }\n
}\n }\n
if (level >= 1) {\n
level = level / 4.;\n level = level / 4.;\n
options[j].innerHTML = options[j].innerHTML.replace(/^(&nbsp;)+/, "");\n options[j].innerHTML = text.replace(/^(&nbsp;)+/, "");\n
options[j].style.paddingLeft = level+"em";\n options[j].style.paddingLeft = level+"em";\n
\n }\n
}\n }\n
}\n }\n
}\n }\n
......
936 938
\ 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