comparison test_create/test_core.js @ 2549:c5fd47349a4f

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