From 98476d6b0a8a3f84ba1839a60c2377c040ed5008 Mon Sep 17 00:00:00 2001 From: WrinklyNinja Date: Sat, 17 May 2014 19:43:32 +0100 Subject: [PATCH] Fixed message display. Turns out I was using HTML templates wrong. Clone first, then modify. --- resources/report/script.js | 14 +++++++------- resources/report/style.css | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/resources/report/script.js b/resources/report/script.js index 4c9f523b..f022c500 100644 --- a/resources/report/script.js +++ b/resources/report/script.js @@ -249,14 +249,16 @@ function processURLParams() { var content, clone; /* First add link to navbar. */ content = document.getElementById('pluginNav').content; - content.children[0].children[0].textContent = data.plugins[i].name; - content.children[0].children[0].href = '#' + data.plugins[i].name.replace(/\s+/g, ''); - clone = document.importNode(content, true); pluginsNav.appendChild(clone); + pluginsNav.lastElementChild.children[0].textContent = data.plugins[i].name; + pluginsNav.lastElementChild.children[0].href = '#' + data.plugins[i].name.replace(/\s+/g, ''); - var content = document.getElementById('pluginSection').content; - var section = content.children[0]; + + content = document.getElementById('pluginSection').content; + clone = document.importNode(content, true); + pluginsList.appendChild(clone); + var section = pluginsList.lastElementChild; section.setAttribute('data-active', data.plugins[i].isActive); section.id = data.plugins[i].name.replace(/\s+/g, ''); @@ -310,8 +312,6 @@ function processURLParams() { } else { section.children[5].className += ' hidden'; } - clone = document.importNode(content, true); - pluginsList.appendChild(clone); } document.getElementById('filterTotalMessageNo').textContent = totalMessageNo; document.getElementById('totalMessageNo').textContent = totalMessageNo; diff --git a/resources/report/style.css b/resources/report/style.css index b660fea5..2a54393e 100644 --- a/resources/report/style.css +++ b/resources/report/style.css @@ -286,7 +286,7 @@ ul { padding:0.5em 1em; list-style:disc inside; } -.error, .warn { +.say, .error, .warn { padding:0.5em 1em; list-style:disc inside; }