# HG changeset patch # User Nicholas Jillings # Date 1458141424 0 # Node ID e0934138c6769e17b060a076aa3aec96d2d80124 # Parent c99d334d85347e12b4f4cabcd5031ffd916b270f Fixed test creator options. Updated interface-specs for ABX. diff -r c99d334d8534 -r e0934138c676 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 c99d334d8534 -r e0934138c676 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 c99d334d8534 -r e0934138c676 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