# HG changeset patch # User Nicholas Jillings # Date 1458141424 0 # Node ID 6dbb9c24d53e8194e34775f7cdcecfbd90013b72 # Parent 8aa21ebd9b151c994b87a75962013bafd345bedc Fixed test creator options. Updated interface-specs for ABX. diff -r 8aa21ebd9b15 -r 6dbb9c24d53e core.js --- 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 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -413,25 +443,7 @@ - - - - - - - - - - - - - - - - - - - + \ No newline at end of file diff -r 8aa21ebd9b15 -r 6dbb9c24d53e test_create/test_core.js --- a/test_create/test_core.js Wed Mar 16 13:31:42 2016 +0000 +++ b/test_create/test_core.js Wed Mar 16 15:17:04 2016 +0000 @@ -932,8 +932,7 @@ } return; } - var type = event.currentTarget.getAttribute("type"); - switch(name) { + switch(event.currentTarget.getAttribute("type")) { case "checkbox": eval("this.option."+name+" = event.currentTarget.checked"); break; diff -r 8aa21ebd9b15 -r 6dbb9c24d53e test_create/test_create.html --- 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