# HG changeset patch # User Nicholas Jillings # Date 1433339790 -3600 # Node ID 5aff374de11c1a4d9433b245dfa3aa52e211e1d2 # Parent f95a30a25a879464fdf131667b7b0f67a92d3df9 create_test: Imports from drag and drop project XML diff -r f95a30a25a87 -r 5aff374de11c 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