Mercurial > hg > webaudioevaluationtool
comparison ape.js @ 174:b19712875046
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 | 3ee7219b1700 |
children | 9eda81aa9fe0 |
comparison
equal
deleted
inserted
replaced
173:54afb9aeb59e | 174:b19712875046 |
---|---|
305 scaleDOM.textContent = scaleObj.textContent; | 305 scaleDOM.textContent = scaleObj.textContent; |
306 scale.appendChild(scaleDOM); | 306 scale.appendChild(scaleDOM); |
307 scaleDOM.style.left = Math.floor((pixelPosition-($(scaleDOM).width()/2)))+'px'; | 307 scaleDOM.style.left = Math.floor((pixelPosition-($(scaleDOM).width()/2)))+'px'; |
308 scaleDOM.setAttributeNode(value); | 308 scaleDOM.setAttributeNode(value); |
309 }); | 309 }); |
310 | |
311 var commentBoxPrefix = interfaceObj.find('commentBoxPrefix'); | |
312 if (commentBoxPrefix.length != 0) { | |
313 commentBoxPrefix = commentBoxPrefix[0].textContent; | |
314 } else { | |
315 commentBoxPrefix = "Comment on track"; | |
316 } | |
310 | 317 |
311 // Extract the hostURL attribute. If not set, create an empty string. | 318 // Extract the hostURL attribute. If not set, create an empty string. |
312 var hostURL = textXML.attributes['hostURL']; | 319 var hostURL = textXML.attributes['hostURL']; |
313 if (hostURL == undefined) { | 320 if (hostURL == undefined) { |
314 hostURL = ""; | 321 hostURL = ""; |
411 var trackComment = document.createElement('div'); | 418 var trackComment = document.createElement('div'); |
412 trackComment.className = 'comment-div'; | 419 trackComment.className = 'comment-div'; |
413 trackComment.id = 'comment-div-'+index; | 420 trackComment.id = 'comment-div-'+index; |
414 // Create a string next to each comment asking for a comment | 421 // Create a string next to each comment asking for a comment |
415 var trackString = document.createElement('span'); | 422 var trackString = document.createElement('span'); |
416 trackString.innerHTML = 'Comment on track '+index; | 423 trackString.innerHTML = commentBoxPrefix+' '+index; |
417 // Create the HTML5 comment box 'textarea' | 424 // Create the HTML5 comment box 'textarea' |
418 var trackCommentBox = document.createElement('textarea'); | 425 var trackCommentBox = document.createElement('textarea'); |
419 trackCommentBox.rows = '4'; | 426 trackCommentBox.rows = '4'; |
420 trackCommentBox.cols = '100'; | 427 trackCommentBox.cols = '100'; |
421 trackCommentBox.name = 'trackComment'+index; | 428 trackCommentBox.name = 'trackComment'+index; |