Mercurial > hg > webaudioevaluationtool
changeset 373:5ca2b999be88 Dev_main
Minor fixes to test_create Specification before merge with core.js Specification
author | Nicholas Jillings <n.g.r.jillings@se14.qmul.ac.uk> |
---|---|
date | Fri, 04 Dec 2015 18:51:58 +0000 |
parents | 5ec4279bf846 |
children | 6139c53deba1 |
files | test_create/test_create.html |
diffstat | 1 files changed, 14 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/test_create/test_create.html Fri Dec 04 18:34:04 2015 +0000 +++ b/test_create/test_create.html Fri Dec 04 18:51:58 2015 +0000 @@ -1898,6 +1898,7 @@ node.setAttribute("min", this.min); node.setAttribute("max", this.max); node.setAttribute("step", this.step); + node.textContent = this.statement; break; case "checkbox": node.id = this.id; @@ -2211,7 +2212,19 @@ case "text": CQNode.textContent = this.question; break; - case "radio" || "checkbox": + case "radio": + var statement = root.createElement("statement"); + statement.textContent = this.statement; + CQNode.appendChild(statement); + for (var i=0; i<this.options.length; i++) + { + var optionNode = root.createElement("option"); + optionNode.setAttribute("name",this.options[i].name); + optionNode.textContent = this.options[i].text; + CQNode.appendChild(optionNode); + } + break; + case "checkbox": var statement = root.createElement("statement"); statement.textContent = this.statement; CQNode.appendChild(statement);