Mercurial > hg > webaudioevaluationtool
diff interfaces/discrete.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 | 78f2dbe417da |
children | 2a1f42b5614a |
line wrap: on
line diff
--- a/interfaces/discrete.js Tue Aug 02 12:43:56 2016 +0100 +++ b/interfaces/discrete.js Tue Aug 02 12:56:45 2016 +0100 @@ -16,6 +16,7 @@ title.className = "title"; title.align = "center"; var titleSpan = document.createElement('span'); + titleSpan.id = "test-title"; // Set title to that defined in XML, else set to default if (titleAttr != undefined) { @@ -126,6 +127,12 @@ console.log("WARNING - This interface only supports one <interface> node per page. Using first interface node"); } interfaceObj = interfaceObj[0]; + + // Set the page title + if (typeof page.title == "string" && page.title.length > 0) { + document.getElementById("test-title").textContent = page.title + } + if(interfaceObj.title != null) { document.getElementById("pageTitle").textContent = interfaceObj.title;