# HG changeset patch # User Nicholas Jillings # Date 1457958876 0 # Node ID d8afd1a440020414aa667e58737a12f0bd9223a6 # Parent 1d0936cfa1d41460e7bb2031b7d6be206ce4a9a2 Test Create fixes for #1597 #1598 #1656 #1657 diff -r 1d0936cfa1d4 -r d8afd1a44002 test-schema.xsd --- a/test-schema.xsd Thu Mar 10 17:08:10 2016 +0000 +++ b/test-schema.xsd Mon Mar 14 12:34:36 2016 +0000 @@ -44,7 +44,7 @@ - + diff -r 1d0936cfa1d4 -r d8afd1a44002 test_create/attributes.json --- a/test_create/attributes.json Thu Mar 10 17:08:10 2016 +0000 +++ b/test_create/attributes.json Mon Mar 14 12:34:36 2016 +0000 @@ -3,7 +3,7 @@ "mandatory": "Mandatory", "name": "Name", "interface": "Interface Module", - "projectReturn": "Results Return URL", + "projectReturn": "Save URL", "randomiseOrder": "Randomise Order", "testPages": "Test Pages", "loudness": "Target Loudness (LUFS)", @@ -19,5 +19,9 @@ "url": "URL", "gain": "Gain (dB)", "marker": "Marker", - "boxsize": "Box Size" + "boxsize": "Box Size", + "label": "Label", + "calibration": "Perform Calibration", + "preSilence": "Pre Silence", + "postSilence": "Post Silence" } diff -r 1d0936cfa1d4 -r d8afd1a44002 test_create/test_core.js --- a/test_create/test_core.js Thu Mar 10 17:08:10 2016 +0000 +++ b/test_create/test_core.js Mon Mar 14 12:34:36 2016 +0000 @@ -699,27 +699,29 @@ this.option = null; this.parent = null; this.optionLists = []; - var select = document.createElement("select"); - select.setAttribute("name","type"); - select.addEventListener("change",this,false); - this.content.appendChild(select); + this.select = document.createElement("select"); + this.select.setAttribute("name","type"); + this.select.addEventListener("change",this,false); + this.content.appendChild(this.select); this.content.appendChild(this.dynamic); this.generate = function(option, parent) { this.option = option; this.parent = parent; - var optionList = specification.schema.getAllElementsByName("survey")[0].getAllElementsByName("type")[0].getAllElementsByTagName("xs:enumeration"); - for (var i=0; i 0) { + if (schema.children[0].nodeName == "xs:simpleType") { + this.dataType = schema.getAllElementsByTagName("xs:restriction")[0].getAttribute("base"); + } + } + } if (typeof this.dataType == "string") { this.dataType = this.dataType.substr(3);} else {this.dataType = "string";} var minVar = undefined;