Mercurial > hg > webaudioevaluationtool
changeset 2551:d1369c301a54
Merge branch 'master' of https://github.com/BrechtDeMan/WebAudioEvaluationTool
author | www-data <www-data@sucuk.dcs.qmul.ac.uk> |
---|---|
date | Thu, 17 Nov 2016 15:20:56 +0000 |
parents | 67cf18d08af8 (current diff) 15b42e98b06c (diff) |
children | fe305a537fc2 |
files | |
diffstat | 2 files changed, 20 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/js/specification.js Thu Nov 17 13:20:56 2016 +0000 +++ b/js/specification.js Thu Nov 17 15:20:56 2016 +0000 @@ -397,7 +397,7 @@ this.encode = function (doc) { var node = doc.createElement("interface"); - if (typeof name == "string") + if (typeof name == "string" && name.length > 0) node.setAttribute("name", this.name); if (typeof this.title == "string") { var titleNode = doc.createElement("title");
--- a/test_create/test_core.js Thu Nov 17 13:20:56 2016 +0000 +++ b/test_create/test_core.js Thu Nov 17 15:20:56 2016 +0000 @@ -1595,7 +1595,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); @@ -1603,6 +1603,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