diff --git a/bt5/erp5_run_my_doc/SkinTemplateItem/portal_skins/erp5_run_my_doc/test_editor.js.xml b/bt5/erp5_run_my_doc/SkinTemplateItem/portal_skins/erp5_run_my_doc/test_editor.js.xml index 32c796a7010be7f2a2cd18e75b213e6df8327b62..dd131178f4338ab6fb46adaa13a11bbfe5068643 100644 --- a/bt5/erp5_run_my_doc/SkinTemplateItem/portal_skins/erp5_run_my_doc/test_editor.js.xml +++ b/bt5/erp5_run_my_doc/SkinTemplateItem/portal_skins/erp5_run_my_doc/test_editor.js.xml @@ -131,8 +131,7 @@ function updateTextContent(){\n testBody.append(lineToAdd);\n }\n }\n - testPageHTML.getElementsByTagName(\'body\')[0].innerHTML = indent(testPageHTML.getElementsByTagName(\'body\')[0].cloneNode(true), 2);\n - $(textContent).text("<!DOCTYPE html>\\n<" + "html" + ">\\n" + $(testPageHTML).html() + "\\n<" + "/html" + ">");\n + $(textContent).text($(indent($(testPageHTML)[0], 2))[0].innerHTML);\n }\n \n //Add an edit button and a remove button to a line\n @@ -142,21 +141,21 @@ function prependEditButtons(element){\n \n $(document).ready(function(){\n $(function() {\n - //Extract slide list\n + // Extract slide list\n textContent = document.getElementsByName(\'field_my_text_content\')[0];\n var tmp = document.createElement(\'tmp\');\n - testPageHTML = document.createElement(\'html\');\n - testPageHTML.appendChild(document.createElement(\'head\'));\n - testPageHTML.appendChild(document.createElement(\'body\'));\n $(tmp).html($(textContent).text());\n - $(\'body\',testPageHTML).append($(\'section\', tmp));\n - $(\'head\',testPageHTML).append($(\'> :not(section)\', tmp));\n +\n + testPageHTML = document.createElement(\'content\');\n + $(testPageHTML).append($(\'section\', tmp));\n +\n $(\'#test_table > thead\').append($(\'test thead > tr > th\', testPageHTML).attr(\'colspan\',5).parent());\n slideList = $(\'section\', testPageHTML);\n +\n var n = slideList.length;\n var body = $(\'#test_table > tbody\');\n \n - //Prepare chapters, and buttons to add instruction for each chapter\n + // Prepare chapters, and buttons to add instruction for each chapter\n for(var i = 0; i < n; i++){\n var slide = slideList.eq(i);\n body.append($(\'<tr>\').append($(\'<th>\').attr(\'colspan\',5).html($(\'h1:first\',slide).html())));\n diff --git a/bt5/erp5_run_my_doc/bt/revision b/bt5/erp5_run_my_doc/bt/revision index 6f4247a6255c99f420d1df558d68745592862ff7..f64f5d8d85ac0230d36724bd7e6ba351a95b4942 100644 --- a/bt5/erp5_run_my_doc/bt/revision +++ b/bt5/erp5_run_my_doc/bt/revision @@ -1 +1 @@ -26 +27