comparison 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
comparison
equal deleted inserted replaced
2469:72cdcd6d143e 2470:1647bb807186
14 var titleAttr = specification.title; 14 var titleAttr = specification.title;
15 var title = document.createElement('div'); 15 var title = document.createElement('div');
16 title.className = "title"; 16 title.className = "title";
17 title.align = "center"; 17 title.align = "center";
18 var titleSpan = document.createElement('span'); 18 var titleSpan = document.createElement('span');
19 titleSpan.id = "test-title";
19 20
20 // Set title to that defined in XML, else set to default 21 // Set title to that defined in XML, else set to default
21 if (titleAttr != undefined) { 22 if (titleAttr != undefined) {
22 titleSpan.textContent = titleAttr; 23 titleSpan.textContent = titleAttr;
23 } else { 24 } else {
124 if (interfaceObj.length > 1) 125 if (interfaceObj.length > 1)
125 { 126 {
126 console.log("WARNING - This interface only supports one <interface> node per page. Using first interface node"); 127 console.log("WARNING - This interface only supports one <interface> node per page. Using first interface node");
127 } 128 }
128 interfaceObj = interfaceObj[0]; 129 interfaceObj = interfaceObj[0];
130
131 // Set the page title
132 if (typeof page.title == "string" && page.title.length > 0) {
133 document.getElementById("test-title").textContent = page.title
134 }
135
129 if(interfaceObj.title != null) 136 if(interfaceObj.title != null)
130 { 137 {
131 document.getElementById("pageTitle").textContent = interfaceObj.title; 138 document.getElementById("pageTitle").textContent = interfaceObj.title;
132 } 139 }
133 140