Mercurial > hg > webaudioevaluationtool
comparison test_create/test_core.js @ 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 | 13a0b65143a6 |
comparison
equal
deleted
inserted
replaced
2610:b982e92a8dad | 2611:060f1a5ee9be |
---|---|
1592 parent: this, | 1592 parent: this, |
1593 handleEvent: function (event) { | 1593 handleEvent: function (event) { |
1594 this.parent.specification.title = event.currentTarget.value; | 1594 this.parent.specification.title = event.currentTarget.value; |
1595 } | 1595 } |
1596 } | 1596 } |
1597 this.titleNode.label.textContent = "Axis Title:"; | 1597 this.titleNode.label.textContent = "Presented Axis Title:"; |
1598 this.titleNode.root.className = "node-children"; | 1598 this.titleNode.root.className = "node-children"; |
1599 this.titleNode.root.appendChild(this.titleNode.label); | 1599 this.titleNode.root.appendChild(this.titleNode.label); |
1600 this.titleNode.root.appendChild(this.titleNode.input); | 1600 this.titleNode.root.appendChild(this.titleNode.input); |
1601 this.titleNode.input.addEventListener("change", this.titleNode, false); | 1601 this.titleNode.input.addEventListener("change", this.titleNode, false); |
1602 this.titleNode.input.value = this.specification.title; | 1602 this.titleNode.input.value = this.specification.title; |
1603 this.children.push(this.titleNode); | 1603 this.children.push(this.titleNode); |
1604 this.childrenDOM.appendChild(this.titleNode.root); | 1604 this.childrenDOM.appendChild(this.titleNode.root); |
1605 // Set the interface-name attribute | |
1606 this.axisName = { | |
1607 root: document.createElement("div"), | |
1608 label: document.createElement("span"), | |
1609 input: document.createElement("input"), | |
1610 parent: this, | |
1611 handleEvent: function (event) { | |
1612 this.parent.specification.name = event.currentTarget.value; | |
1613 } | |
1614 } | |
1615 this.axisName.label.textContent = "Saved Axis Name (no spaces):"; | |
1616 this.axisName.root.className = "node-children"; | |
1617 this.axisName.root.appendChild(this.axisName.label); | |
1618 this.axisName.root.appendChild(this.axisName.input); | |
1619 this.axisName.input.addEventListener("change", this.axisName, false); | |
1620 this.axisName.input.value = this.specification.name; | |
1621 this.children.push(this.axisName); | |
1622 this.childrenDOM.appendChild(this.axisName.root); | |
1605 } | 1623 } |
1606 | 1624 |
1607 // Put in the check / show options as individual children | 1625 // Put in the check / show options as individual children |
1608 var checks = this.parent.createGeneralNodeDOM("Checks", "setup-interface-checks", this); | 1626 var checks = this.parent.createGeneralNodeDOM("Checks", "setup-interface-checks", this); |
1609 | 1627 |