Mercurial > hg > webaudioevaluationtool
changeset 2476:2865592f6037
Merge branch 'master' of https://github.com/BrechtDeMan/WebAudioEvaluationTool
author | www-data <www-data@sucuk.dcs.qmul.ac.uk> |
---|---|
date | Tue, 02 Aug 2016 16:20:52 +0100 |
parents | 32335c0f5a08 (current diff) 026ec377f5bc (diff) |
children | 1cc68e4ce885 |
files | |
diffstat | 2 files changed, 18 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/interfaces/AB.js Tue Aug 02 15:20:50 2016 +0100 +++ b/interfaces/AB.js Tue Aug 02 16:20:52 2016 +0100 @@ -109,6 +109,10 @@ submit.style.left = (window.innerWidth-250)/2 + 'px'; feedbackHolder.appendChild(boxes); + + // Create holder for comment boxes + var comments = document.createElement("div"); + comments.id = "comment-box-holder"; // Inject into HTML testContent.appendChild(title); // Insert the title @@ -117,6 +121,7 @@ testContent.appendChild(outsideRef); testContent.appendChild(feedbackHolder); testContent.appendChild(submit); + testContent.appendChild(comments); interfaceContext.insertPoint.appendChild(testContent); // Load the full interface @@ -134,6 +139,9 @@ } interfaceObj = interfaceObj[0]; + var commentHolder = document.getElementById('comment-box-holder'); + commentHolder.innerHTML = ""; + // Delete outside reference var outsideReferenceHolder = document.getElementById("outside-reference-holder"); outsideReferenceHolder.innerHTML = ""; @@ -197,9 +205,6 @@ } break; case "comments": - var commentHolder = document.createElement('div'); - commentHolder.id = 'commentHolder'; - document.getElementById('testContent').appendChild(commentHolder); // Generate one comment box per presented page for (var element of audioEngineContext.audioObjects) { @@ -213,7 +218,7 @@ $(audioHolderObject.commentQuestions).each(function(index,element) { var node = interfaceContext.createCommentQuestion(element); - document.getElementById('testContent').appendChild(node.holder); + commentHolder.appendChild(node.holder); }); resizeWindow(null);
--- a/interfaces/ABX.js Tue Aug 02 15:20:50 2016 +0100 +++ b/interfaces/ABX.js Tue Aug 02 16:20:52 2016 +0100 @@ -110,6 +110,10 @@ submit.style.left = (window.innerWidth-250)/2 + 'px'; feedbackHolder.appendChild(boxes); + + // Create holder for comment boxes + var comments = document.createElement("div"); + comments.id = "comment-box-holder"; // Inject into HTML testContent.appendChild(title); // Insert the title @@ -117,6 +121,7 @@ testContent.appendChild(interfaceButtons); testContent.appendChild(feedbackHolder); testContent.appendChild(submit); + testContent.appendChild(comments); interfaceContext.insertPoint.appendChild(testContent); // Load the full interface @@ -136,6 +141,9 @@ } interfaceObj = interfaceObj[0]; + var commentHolder = document.getElementById("comment-box-holder"); + commentHolder.innerHTML = ""; + // Set the page title if (typeof page.title == "string" && page.title.length > 0) { document.getElementById("test-title").textContent = page.title @@ -184,9 +192,6 @@ } break; case "comments": - var commentHolder = document.createElement('div'); - commentHolder.id = 'commentHolder'; - document.getElementById('testContent').appendChild(commentHolder); // Generate one comment box per presented page for (var element of audioEngineContext.audioObjects) { @@ -200,7 +205,7 @@ $(page.commentQuestions).each(function(index,element) { var node = interfaceContext.createCommentQuestion(element); - document.getElementById('testContent').appendChild(node.holder); + commentHolder.appendChild(node.holder); }); resizeWindow(null);