# HG changeset patch # User Nicholas Jillings # Date 1433339790 -3600 # Node ID 79ac043f255612c209f9579dd87011b8cc0fda2a # Parent 4166218d811009342b7fafe5d0497b89f0f5d5c8 create_test: Imports from drag and drop project XML diff -r 4166218d8110 -r 79ac043f2556 test_create/test_create.html --- a/test_create/test_create.html Wed Jun 03 12:54:08 2015 +0100 +++ b/test_create/test_create.html Wed Jun 03 14:56:30 2015 +0100 @@ -185,8 +185,9 @@ var node = document.createElement('question'); node.setAttribute('id',attributes[0].value); node.textContent = attributes[1].value; + node.setAttribute('mandatory',attributes[2].checked); } else if (elem.getAttribute('name') == 'statement-node') { - var node = document.createElement('statment'); + var node = document.createElement('statement'); node.textContent = attributes[0].value; } parent.appendChild(node); @@ -264,9 +265,12 @@ attributes.setAttribute('class','attrib'); var id = attributePair("ID:","text", true); var question = attributePair("Question:","text", false); + question[1].style.width = "500px"; + var mandatory = attributePair("Mandatory:","checkbox", false); node.appendChild(nodeTitle); id.forEach(function(item){attributes.appendChild(item);},false); question.forEach(function(item){attributes.appendChild(item);},false); + mandatory.forEach(function(item){attributes.appendChild(item);},false); node.appendChild(attributes); var removeButton = document.createElement("button"); @@ -285,6 +289,7 @@ var attributes = document.createElement("div"); attributes.setAttribute('class','attrib'); var statement = attributePair("Statement:","text",false); + statement[1].style.width = "500px"; node.appendChild(nodeTitle); statement.forEach(function(item){attributes.appendChild(item);},false); node.appendChild(attributes); @@ -383,22 +388,15 @@ } function audioElementNode() { - var parentStructure = event.srcElement.parentElement.childNodes; - var audioElemCounts = 0; - for (var i=0; i