Mercurial > hg > webaudioevaluationtool
diff core.js @ 620:e0934138c676 Dev_main
Fixed test creator <surveyentry> options. Updated interface-specs for ABX.
author | Nicholas Jillings <n.g.r.jillings@se14.qmul.ac.uk> |
---|---|
date | Wed, 16 Mar 2016 15:17:04 +0000 |
parents | c99d334d8534 |
children | 2930218004f5 |
line wrap: on
line diff
--- a/core.js Wed Mar 16 13:31:42 2016 +0000 +++ b/core.js Wed Mar 16 15:17:04 2016 +0000 @@ -2028,19 +2028,13 @@ var statement = doc.createElement('statement'); statement.textContent = this.statement; node.appendChild(statement); - if (this.type != "statement") { - node.id = this.id; - if (this.name != undefined) { node.setAttribute("name",this.name);} - if (this.mandatory != undefined) { node.setAttribute("mandatory",this.mandatory);} - switch(this.type) - { - case "question": - if (this.boxsize != undefined) {node.setAttribute("boxsize",this.boxsize);} - break; - case "number": - if (this.min != undefined) {node.setAttribute("min", this.min);} - if (this.max != undefined) {node.setAttribute("max", this.max);} - break; + node.id = this.id; + if (this.name != undefined) { node.setAttribute("name",this.name);} + if (this.mandatory != undefined) { node.setAttribute("mandatory",this.mandatory);} + node.id = this.id; + if (this.name != undefined) {node.setAttribute("name",this.name);} + switch(this.type) + { case "checkbox": case "radio": for (var i=0; i<this.options.length; i++) @@ -2051,8 +2045,14 @@ optionNode.textContent = option.text; node.appendChild(optionNode); } + case "number": + if (this.min != undefined) {node.setAttribute("min", this.min);} + if (this.max != undefined) {node.setAttribute("max", this.max);} + case "question": + if (this.boxsize != undefined) {node.setAttribute("boxsize",this.boxsize);} + if (this.mandatory != undefined) {node.setAttribute("mandatory",this.mandatory);} + default: break; - } } return node; };