Mercurial > hg > webaudioevaluationtool
diff test_create/test_core.js @ 2179:9fa5e164b3ef
Implemented Bug/Feature #1649. Edit the exit text by modifying <exitText>, see mushra_example.xml for example.
author | Nicholas Jillings <nickjillings@users.noreply.github.com> |
---|---|
date | Tue, 22 Mar 2016 13:44:59 +0000 |
parents | 931d3a88e552 |
children | 6798b5afa2c9 |
line wrap: on
line diff
--- a/test_create/test_core.js Tue Mar 22 12:35:48 2016 +0000 +++ b/test_create/test_core.js Tue Mar 22 13:44:59 2016 +0000 @@ -1336,6 +1336,29 @@ this.setupDOM.attributes.push(attrObject); } + // Build the exit Text node + var exitText = new this.createGeneralNodeDOM("Exit Text","exit-test",this.setupDOM); + exitText.rootDOM.removeChild(exitText.attributeDOM); + this.setupDOM.children.push(exitText); + this.setupDOM.childrenDOM.appendChild(exitText.rootDOM); + var obj = { + rootDOM: document.createElement("div"), + labelDOM: document.createElement("label"), + inputDOM: document.createElement("textarea"), + parent: exitText, + specification: specification, + handleEvent: function(event) { + this.specification.exitText = this.inputDOM.value; + } + } + obj.rootDOM.appendChild(obj.labelDOM); + obj.rootDOM.appendChild(obj.inputDOM); + obj.labelDOM.textContent = "Text: "; + obj.inputDOM.value = obj.specification.exitText; + obj.inputDOM.addEventListener("change",obj); + exitText.children.push(obj); + exitText.childrenDOM.appendChild(obj.rootDOM); + // Now we must build the interface Node this.interfaceDOM = new this.interfaceNode(this,specification.interfaces); this.interfaceDOM.build("Interface","setup-interface",this.setupDOM.rootDOM);