# HG changeset patch # User Nicholas Jillings # Date 1456143583 0 # Node ID efac13499354d71b1b6674ecff946afaaeda3c73 # Parent 26b9c01ad2cce22f6e4bccce43f377b6a9e90ea8# Parent 61494bd607b22f7f9ce317dd56a0c7e3c856190e Merge into dev_main diff -r 26b9c01ad2cc -r efac13499354 .hgignore --- a/.hgignore Sun Feb 21 03:35:27 2016 +0000 +++ b/.hgignore Mon Feb 22 12:19:43 2016 +0000 @@ -49,3 +49,5 @@ re:^docs/DMRN+10/img/\._TestCreate\.png$ re:^docs/DMRN+10/img/\._APE\.png$ re:^docs/DMRN+10/img/\._MUSHRA\.png$ +example_eval/samples/* + diff -r 26b9c01ad2cc -r efac13499354 analyse.html --- a/analyse.html Sun Feb 21 03:35:27 2016 +0000 +++ b/analyse.html Mon Feb 22 12:19:43 2016 +0000 @@ -24,7 +24,7 @@ xmlFileFolder = "saves"; // array of XML files // THIS IS WHERE YOU SPECIFY RESULT XML FILES TO ANALYSE - var xmlFiles = ['test-0.xml','test-1.xml','test-2.xml','test-3.xml']; + var xmlFiles = ['test-2.xml']; //TODO: make retrieval of file names automatic / drag files on here @@ -284,6 +284,7 @@ xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.open("GET",xmlFileName,false); + xmlhttp.overrideMimeType('text/xml'); xmlhttp.send(); return xmlhttp.responseXML; } @@ -300,11 +301,11 @@ fileNameArray.push(xmlFiles[fileIndex]); // get root of XML file - root = xml.getElementsByTagName('browserevaluationresult')[0]; + root = xml.getElementsByTagName('waetresult')[0]; // get subject ID, add to array if not already there - pretest = root.getElementsByTagName('pretest')[0]; - subjectID = pretest.getElementsByTagName('comment')[0]; + pretestSurveyResult = root.getElementsByTagName('surveyresult')[0]; + subjectID = pretestSurveyResult.getElementsByTagName('comment')[0]; if (subjectID){ if (subjectID.getAttribute('id')!='sessionId') { // warning in console when not available console.log(xmlFiles[fileIndex]+': no SessionID available'); @@ -378,7 +379,7 @@ // which songs did they do if (xml != null) { // if file exists // get root of XML file - root = xml.getElementsByTagName('browserevaluationresult')[0]; + root = xml.getElementsByTagName('waetresult')[0]; // go over all audioholders // document.getElementById('div_survey_'+xmlFileName).innerHTML += 'Audioholders: '; // audioholderNodes = root.getElementsByTagName('audioholder'); @@ -415,7 +416,7 @@ function makePlots() { //TODO: split into different functions // TEMPORARY - makeTimeline(xmlFileFolder+"/"+xmlFiles[7]); + makeTimeline(xmlFileFolder+"/"+xmlFiles[0]); // create value array var ratings = []; // 3D matrix of ratings (audioholder, audioelement, subject) @@ -432,7 +433,7 @@ xml = readXML(xmlFileName); if (xml != null) { // if file exists // get root of XML file - root = xml.getElementsByTagName('browserevaluationresult')[0]; + root = xml.getElementsByTagName('waetresult')[0]; // go over all audioholders audioholderNodes = root.getElementsByTagName('audioholder'); for (audioholderIndex = 0; audioholderIndex < audioholderNodes.length; audioholderIndex++) { @@ -594,7 +595,7 @@ return; // do nothing; exit function } // get root of XML file - root = xml.getElementsByTagName('browserevaluationresult')[0]; + root = xml.getElementsByTagName('waetresult')[0]; audioholder_time = 0; previous_audioholder_time = 0; // time spent before current audioholder diff -r 26b9c01ad2cc -r efac13499354 core.js --- a/core.js Sun Feb 21 03:35:27 2016 +0000 +++ b/core.js Mon Feb 22 12:19:43 2016 +0000 @@ -342,11 +342,13 @@ if (xmlhttp.status != 200 && xmlhttp.readyState == 4) { createProjectSave(null); } else { - if (xmlhttp.responseXML == null) + var parser = new DOMParser(); + var xmlDoc = parser.parseFromString(xmlhttp.responseText, "application/xml"); + if (xmlDoc == null) { createProjectSave('null'); } - var response = xmlhttp.responseXML.childNodes[0]; + var response = xmlDoc.childNodes[0]; if (response.getAttribute('state') == "OK") { var file = response.getElementsByTagName('file')[0]; diff -r 26b9c01ad2cc -r efac13499354 save.php --- a/save.php Sun Feb 21 03:35:27 2016 +0000 +++ b/save.php Mon Feb 22 12:19:43 2016 +0000 @@ -1,6 +1,7 @@ div.node{ + background-color: rgb(200,228,151); +} + +div#content > div#setup{ + background-color: coral; +} + +input:disabled+span{ + text-decoration: line-through; +} + +div.attribute{ + float: none; +} +div.attribute input{ + max-width: 100%; + width: 300px; +} +div.attribute input[type=radio], div.attribute input[type=checkbox]{ + width: 10px; +} \ No newline at end of file diff -r 26b9c01ad2cc -r efac13499354 test_create/style.css --- a/test_create/style.css Sun Feb 21 03:35:27 2016 +0000 +++ b/test_create/style.css Mon Feb 22 12:19:43 2016 +0000 @@ -70,6 +70,16 @@ color: rgb(100,100,100); } + +div#content > div.node{ + background-color: rgb(200,228,151); +} + +div#content > div#setup{ + background-color: coral; +} + + div.node { float: left; padding: 10px; @@ -87,7 +97,7 @@ } div.node-attributes { min-width: 92%; - float: left; + float: none; padding: 10px; } div.attribute { @@ -103,9 +113,16 @@ min-width: 92%; } div.attribute input { - max-width: 100px; + max-width: 100%; + width: 300px; margin-right: 10px; } div.attribute input[type=number] { width: 80px; +} +div.attribute input[type=radio], div.attribute input[type=checkbox]{ + width: 10px; +} +input:disabled+span{ + text-decoration: line-through; } \ No newline at end of file diff -r 26b9c01ad2cc -r efac13499354 test_create/test_create.html --- a/test_create/test_create.html Sun Feb 21 03:35:27 2016 +0000 +++ b/test_create/test_create.html Mon Feb 22 12:19:43 2016 +0000 @@ -2,7 +2,9 @@ +