Mercurial > hg > webaudioevaluationtool
diff test_create/test_create.html @ 1895:37c5e99ef828
Fixed test creator <surveyentry> options. Updated interface-specs for ABX.
author | Nicholas Jillings <nickjillings@users.noreply.github.com> |
---|---|
date | Wed, 16 Mar 2016 15:17:04 +0000 |
parents | 1d0936cfa1d4 |
children | 3600fff74af9 |
line wrap: on
line diff
--- a/test_create/test_create.html Wed Mar 16 13:31:42 2016 +0000 +++ b/test_create/test_create.html Wed Mar 16 15:17:04 2016 +0000 @@ -236,19 +236,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++) @@ -259,8 +253,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; };