# HG changeset patch # User Nicholas Jillings # Date 1458141424 0 # Node ID 894d9bfd4177d56d3d6b6b6116dbd638d1e12996 # Parent 4208c3b73b741e4c5e79d807e1b3fc07ede08b79 Fixed test creator options. Updated interface-specs for ABX. diff -r 4208c3b73b74 -r 894d9bfd4177 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 4208c3b73b74 -r 894d9bfd4177 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 4208c3b73b74 -r 894d9bfd4177 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