Mercurial > hg > webaudioevaluationtool
comparison test_create/test_core.js @ 1271:2dd5f7071e3f
Implemented Bug/Feature #1649. Edit the exit text by modifying <exitText>, see mushra_example.xml for example.
author | Nicholas Jillings <n.g.r.jillings@se14.qmul.ac.uk> |
---|---|
date | Tue, 22 Mar 2016 13:44:59 +0000 |
parents | 6533f0c11d9a |
children | 6798b5afa2c9 |
comparison
equal
deleted
inserted
replaced
1270:aebb9754d491 | 1271:2dd5f7071e3f |
---|---|
1334 var attrObject = this.convertAttributeToDOM(specification,setupAttributes[i]); | 1334 var attrObject = this.convertAttributeToDOM(specification,setupAttributes[i]); |
1335 this.setupDOM.attributeDOM.appendChild(attrObject.holder); | 1335 this.setupDOM.attributeDOM.appendChild(attrObject.holder); |
1336 this.setupDOM.attributes.push(attrObject); | 1336 this.setupDOM.attributes.push(attrObject); |
1337 } | 1337 } |
1338 | 1338 |
1339 // Build the exit Text node | |
1340 var exitText = new this.createGeneralNodeDOM("Exit Text","exit-test",this.setupDOM); | |
1341 exitText.rootDOM.removeChild(exitText.attributeDOM); | |
1342 this.setupDOM.children.push(exitText); | |
1343 this.setupDOM.childrenDOM.appendChild(exitText.rootDOM); | |
1344 var obj = { | |
1345 rootDOM: document.createElement("div"), | |
1346 labelDOM: document.createElement("label"), | |
1347 inputDOM: document.createElement("textarea"), | |
1348 parent: exitText, | |
1349 specification: specification, | |
1350 handleEvent: function(event) { | |
1351 this.specification.exitText = this.inputDOM.value; | |
1352 } | |
1353 } | |
1354 obj.rootDOM.appendChild(obj.labelDOM); | |
1355 obj.rootDOM.appendChild(obj.inputDOM); | |
1356 obj.labelDOM.textContent = "Text: "; | |
1357 obj.inputDOM.value = obj.specification.exitText; | |
1358 obj.inputDOM.addEventListener("change",obj); | |
1359 exitText.children.push(obj); | |
1360 exitText.childrenDOM.appendChild(obj.rootDOM); | |
1361 | |
1339 // Now we must build the interface Node | 1362 // Now we must build the interface Node |
1340 this.interfaceDOM = new this.interfaceNode(this,specification.interfaces); | 1363 this.interfaceDOM = new this.interfaceNode(this,specification.interfaces); |
1341 this.interfaceDOM.build("Interface","setup-interface",this.setupDOM.rootDOM); | 1364 this.interfaceDOM.build("Interface","setup-interface",this.setupDOM.rootDOM); |
1342 | 1365 |
1343 // Now build the Metrics selection node | 1366 // Now build the Metrics selection node |