changeset 1022:0fdca5989285

Feature #1232: <commentBoxPrefix> node now in <interface> of audioHolder. If not specified, default is 'Comment on track'
author Nicholas Jillings <n.g.r.jillings@se14.qmul.ac.uk>
date Thu, 04 Jun 2015 10:06:42 +0100
parents 35682e8e1159
children 907abe027ebc
files ape.js example_eval/project.xml
diffstat 2 files changed, 10 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ape.js	Thu Jun 04 09:45:32 2015 +0100
+++ b/ape.js	Thu Jun 04 10:06:42 2015 +0100
@@ -307,6 +307,13 @@
 		scaleDOM.style.left = Math.floor((pixelPosition-($(scaleDOM).width()/2)))+'px';
 		scaleDOM.setAttributeNode(value);
 	});
+	
+	var commentBoxPrefix = interfaceObj.find('commentBoxPrefix');
+	if (commentBoxPrefix.length != 0) {
+		commentBoxPrefix = commentBoxPrefix[0].textContent;
+	} else {
+		commentBoxPrefix = "Comment on track";
+	}
 
 	// Extract the hostURL attribute. If not set, create an empty string.
 	var hostURL = textXML.attributes['hostURL'];
@@ -413,7 +420,7 @@
 			trackComment.id = 'comment-div-'+index;
 			// Create a string next to each comment asking for a comment
 			var trackString = document.createElement('span');
-			trackString.innerHTML = 'Comment on track '+index;
+			trackString.innerHTML = commentBoxPrefix+' '+index;
 			// Create the HTML5 comment box 'textarea'
 			var trackCommentBox = document.createElement('textarea');
 			trackCommentBox.rows = '4';
--- a/example_eval/project.xml	Thu Jun 04 09:45:32 2015 +0100
+++ b/example_eval/project.xml	Thu Jun 04 10:06:42 2015 +0100
@@ -26,6 +26,7 @@
 			<scale position="100">Max</scale>
 			<scale position="50">Middle</scale>
 			<scale position="20">20</scale>
+			<commentBoxPrefix>Comment on fragment</commentBoxPrefix>
 		</interface>
 		<audioElements url="0.wav" id="0"/>
 		<audioElements url="1.wav" id="1"/>
@@ -38,7 +39,7 @@
 		<audioElements url="8.wav" id="8"/>
 		<audioElements url="9.wav" id="9"/>
 		<audioElements url="10.wav" id="10"/>-->
-		<CommentQuestion id='mixingExperiance'>What is your mixing experiance</CommentQuestion>
+		<CommentQuestion id='mixingExperience'>What is your mixing experience</CommentQuestion>
 		<!--
 		<PreTest>
 			<statement>Start the Test 3</statement>