Mercurial > hg > webaudioevaluationtool
comparison test_create/test_create.html @ 768:30d29aea590f
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 | d7f2912bf487 |
children | 30adbf6a6d50 |
comparison
equal
deleted
inserted
replaced
767:d7f2912bf487 | 768:30d29aea590f |
---|---|
1896 node.id = this.id; | 1896 node.id = this.id; |
1897 node.setAttribute("mandatory",this.mandatory); | 1897 node.setAttribute("mandatory",this.mandatory); |
1898 node.setAttribute("min", this.min); | 1898 node.setAttribute("min", this.min); |
1899 node.setAttribute("max", this.max); | 1899 node.setAttribute("max", this.max); |
1900 node.setAttribute("step", this.step); | 1900 node.setAttribute("step", this.step); |
1901 node.textContent = this.statement; | |
1901 break; | 1902 break; |
1902 case "checkbox": | 1903 case "checkbox": |
1903 node.id = this.id; | 1904 node.id = this.id; |
1904 var statement = root.createElement("statement"); | 1905 var statement = root.createElement("statement"); |
1905 statement.textContent = this.statement; | 1906 statement.textContent = this.statement; |
2209 switch(this.type) | 2210 switch(this.type) |
2210 { | 2211 { |
2211 case "text": | 2212 case "text": |
2212 CQNode.textContent = this.question; | 2213 CQNode.textContent = this.question; |
2213 break; | 2214 break; |
2214 case "radio" || "checkbox": | 2215 case "radio": |
2216 var statement = root.createElement("statement"); | |
2217 statement.textContent = this.statement; | |
2218 CQNode.appendChild(statement); | |
2219 for (var i=0; i<this.options.length; i++) | |
2220 { | |
2221 var optionNode = root.createElement("option"); | |
2222 optionNode.setAttribute("name",this.options[i].name); | |
2223 optionNode.textContent = this.options[i].text; | |
2224 CQNode.appendChild(optionNode); | |
2225 } | |
2226 break; | |
2227 case "checkbox": | |
2215 var statement = root.createElement("statement"); | 2228 var statement = root.createElement("statement"); |
2216 statement.textContent = this.statement; | 2229 statement.textContent = this.statement; |
2217 CQNode.appendChild(statement); | 2230 CQNode.appendChild(statement); |
2218 for (var i=0; i<this.options.length; i++) | 2231 for (var i=0; i<this.options.length; i++) |
2219 { | 2232 { |