Mercurial > hg > webaudioevaluationtool
changeset 2611:060f1a5ee9be
#107. Added axis-name setting in test_create
author | Nicholas Jillings <nicholas.jillings@mail.bcu.ac.uk> |
---|---|
date | Mon, 14 Nov 2016 20:34:58 +0000 |
parents | b982e92a8dad |
children | 5c36d79b2f4b |
files | test_create/test_core.js |
diffstat | 1 files changed, 19 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/test_create/test_core.js Mon Nov 14 20:21:32 2016 +0000 +++ b/test_create/test_core.js Mon Nov 14 20:34:58 2016 +0000 @@ -1594,7 +1594,7 @@ this.parent.specification.title = event.currentTarget.value; } } - this.titleNode.label.textContent = "Axis Title:"; + this.titleNode.label.textContent = "Presented Axis Title:"; this.titleNode.root.className = "node-children"; this.titleNode.root.appendChild(this.titleNode.label); this.titleNode.root.appendChild(this.titleNode.input); @@ -1602,6 +1602,24 @@ this.titleNode.input.value = this.specification.title; this.children.push(this.titleNode); this.childrenDOM.appendChild(this.titleNode.root); + // Set the interface-name attribute + this.axisName = { + root: document.createElement("div"), + label: document.createElement("span"), + input: document.createElement("input"), + parent: this, + handleEvent: function (event) { + this.parent.specification.name = event.currentTarget.value; + } + } + this.axisName.label.textContent = "Saved Axis Name (no spaces):"; + this.axisName.root.className = "node-children"; + this.axisName.root.appendChild(this.axisName.label); + this.axisName.root.appendChild(this.axisName.input); + this.axisName.input.addEventListener("change", this.axisName, false); + this.axisName.input.value = this.specification.name; + this.children.push(this.axisName); + this.childrenDOM.appendChild(this.axisName.root); } // Put in the check / show options as individual children