Mercurial > hg > webaudioevaluationtool
comparison interfaces/mushra.js @ 2470:1647bb807186
Fix for #128
author | Nicholas Jillings <nicholas.jillings@mail.bcu.ac.uk> |
---|---|
date | Tue, 02 Aug 2016 12:56:45 +0100 |
parents | b7ed9d43ea87 |
children | 464c6c6692d6 |
comparison
equal
deleted
inserted
replaced
2469:72cdcd6d143e | 2470:1647bb807186 |
---|---|
20 var titleAttr = specification.title; | 20 var titleAttr = specification.title; |
21 var title = document.createElement('div'); | 21 var title = document.createElement('div'); |
22 title.className = "title"; | 22 title.className = "title"; |
23 title.align = "center"; | 23 title.align = "center"; |
24 var titleSpan = document.createElement('span'); | 24 var titleSpan = document.createElement('span'); |
25 titleSpan.id = "test-title"; | |
25 | 26 |
26 // Set title to that defined in XML, else set to default | 27 // Set title to that defined in XML, else set to default |
27 if (titleAttr != undefined) { | 28 if (titleAttr != undefined) { |
28 titleSpan.textContent = titleAttr; | 29 titleSpan.textContent = titleAttr; |
29 } else { | 30 } else { |
125 if (interfaceObj.length > 1) | 126 if (interfaceObj.length > 1) |
126 { | 127 { |
127 console.log("WARNING - This interface only supports one <interface> node per page. Using first interface node"); | 128 console.log("WARNING - This interface only supports one <interface> node per page. Using first interface node"); |
128 } | 129 } |
129 interfaceObj = interfaceObj[0]; | 130 interfaceObj = interfaceObj[0]; |
131 | |
132 // Set the page title | |
133 if (typeof audioHolderObject.title == "string" && audioHolderObject.title.length > 0) { | |
134 document.getElementById("test-title").textContent = audioHolderObject.title | |
135 } | |
136 | |
130 if(interfaceObj.title != null) | 137 if(interfaceObj.title != null) |
131 { | 138 { |
132 document.getElementById("pageTitle").textContent = interfaceObj.title; | 139 document.getElementById("pageTitle").textContent = interfaceObj.title; |
133 } | 140 } |
134 | 141 |