Mercurial > hg > webaudioevaluationtool
changeset 2779:46105b2573fc
#138. Fixed image per interface implemented in core. Working example in AB
author | Nicholas Jillings <nicholas.jillings@mail.bcu.ac.uk> |
---|---|
date | Fri, 21 Apr 2017 15:07:24 +0100 |
parents | 80c95ab21220 |
children | 9c031a976321 |
files | css/core.css interfaces/AB.js tests/examples/AB_example.xml |
diffstat | 3 files changed, 18 insertions(+), 48 deletions(-) [+] |
line wrap: on
line diff
--- a/css/core.css Fri Apr 21 14:56:28 2017 +0100 +++ b/css/core.css Fri Apr 21 15:07:24 2017 +0100 @@ -8,7 +8,6 @@ margin-bottom: 10px; font-size: 2em; } - div.indicator-box { position: absolute; left: 150px; @@ -19,7 +18,6 @@ border-radius: 10px; background-color: rgb(100, 200, 200); } - div.comment-div { border: 1px solid #444444; max-width: 600px; @@ -29,11 +27,9 @@ height: 90px; border-radius: 10px; } - div.comment-div span { margin-left: 15px; } - div.popupHolder { width: 500px; min-height: 250px; @@ -44,19 +40,16 @@ z-index: 10; position: fixed; } - div#popupContent { margin-top: 20px; margin-bottom: 35px; overflow: auto; } - div#popupContent iframe { width: 100%; border: 0px none; height: 290px; } - div#popupTitleHolder { width: inherit; min-height: 25px; @@ -66,11 +59,9 @@ padding: 8px; text-align: center; } - #popupTitle { white-space: pre-line; } - div#popupResponse { width: inherit; min-height: 50px; @@ -78,7 +69,6 @@ overflow: auto; position: relative; } - button.popupButton { /* Button for popup window */ @@ -91,7 +81,6 @@ border-style: solid; background-color: #fff; } - div.popup-option-checbox { /* Popup window checkbox */ padding: 5px; @@ -99,41 +88,33 @@ width: -moz-fit-content; width: -webkit-fit-content; } - div.popup-option-checbox input { /* Popup window checkbox */ margin-right: 15px; } - table.popup-option-list { margin: auto; } - table.popup-option-list tr { padding: 5px; } - table.popup-option-list tr td { padding: 5px; } - div.survey-slider-text-holder { display: flex; flex-direction: row; justify-content: space-between; padding: 0px 15px; } - button#popup-proceed { bottom: 10px; right: 10px; } - button#popup-previous { bottom: 10px; left: 10px; } - div.testHalt { /* Specify any colouring during the test halt for pre/post questions */ background-color: rgba(0, 0, 0, 0.5); @@ -145,7 +126,6 @@ left: 0px; top: 0px; } - div#lightbox-root { visibility: hidden; z-index: 20; @@ -153,7 +133,6 @@ min-height: 50px; max-height: 250px; } - div.lightbox-error { margin: 25px; margin-bottom: 50px; @@ -162,7 +141,6 @@ background-color: rgb(255, 220, 220); border: 2px rgb(200, 0, 0) solid; } - div.lightbox-warning { margin: 25px; margin-bottom: 50px; @@ -171,7 +149,6 @@ background-color: rgb(255, 255, 220); border: 2px rgb(255, 250, 0) solid; } - div.lightbox-message { margin: 25px; margin-bottom: 50px; @@ -180,26 +157,22 @@ background-color: rgb(200, 220, 255); border: 2px rgb(50, 100, 250) solid; } - div#lightbox-blanker { visibility: hidden; z-index: 19; } - button.outside-reference { width: 120px; height: 20px; margin-bottom: 5px; position: absolute; } - textarea.trackComment { max-width: 594px; min-width: 350px; max-height: 60px; resize: none; } - div.playhead { width: 500px; height: 50px; @@ -207,26 +180,22 @@ border-radius: 10px; padding: 10px; } - div.playhead-scrub-track { width: 100%; height: 10px; border-style: solid; border-width: 1px; } - div#playhead-scrubber { width: 10px; height: 10px; position: relative; background-color: #000; } - div.master-volume-holder-inline { width: 100%; padding: 5px; } - div.master-volume-holder-float { position: absolute; top: 20px; @@ -234,7 +203,6 @@ width: 250px; padding: 5px; } - div#master-volume-root { margin: auto; border: black 1px solid; @@ -242,7 +210,6 @@ width: 250px; height: 40px; } - input#master-volume-control { width: 190px; height: 25px; @@ -250,28 +217,23 @@ margin: 0px; padding: 0px; } - span#master-volume-feedback { height: 25px; margin: 0px 5px; float: right; } - div.error-colour { background-color: #FF8F8F; } - button.error-colour { background-color: #FF8F8F; color: black; } - div.calibration-holder { text-align: center; align-content: center; height: auto; } - div.calibration-slider { width: 50px; margin: 2px; @@ -279,7 +241,6 @@ align-content: center; float: left; } - div.calibration-slider input[type=range][orient=vertical] { writing-mode: bt-lr; /* IE */ @@ -290,7 +251,6 @@ height: 290px; } - /* Comment Boxes */ div.comment-slider-text-holder { @@ -298,25 +258,29 @@ flex-direction: row; justify-content: space-between; } - div.comment-slider-text-holder span { margin: 0px 5px; } - div.comment-checkbox-inputs-holder { display: flex; flex-direction: row; justify-content: space-around; margin: 10px 5px; } - div.comment-checkbox-inputs-flex { display: flex; flex-direction: column; justify-content: space-between; align-items: center; } - div.comment-box-playing { background-color: #FFDDDD; } +div#imageController { + align-content: center; + text-align: center; + height: 250px; +} +div#imageController img { + max-height: 250px; +}
--- a/interfaces/AB.js Fri Apr 21 14:56:28 2017 +0100 +++ b/interfaces/AB.js Fri Apr 21 15:07:24 2017 +0100 @@ -124,10 +124,15 @@ document.getElementById("test-title").textContent = audioHolderObject.title; } - if (interfaceObj.title !== null) { + if (interfaceObj.title !== undefined) { document.getElementById("pageTitle").textContent = interfaceObj.title; } + if (interfaceObj.image !== undefined) { + feedbackHolder.insertBefore(interfaceContext.imageHolder.root, document.getElementById("box-holders")); + interfaceContext.imageHolder.setImage(interfaceObj.image); + } + var interfaceOptions = interfaceObj.options; // Clear the interfaceElements {
--- a/tests/examples/AB_example.xml Fri Apr 21 14:56:28 2017 +0100 +++ b/tests/examples/AB_example.xml Fri Apr 21 15:07:24 2017 +0100 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <waet xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="test-schema.xsd"> - <setup interface="AB" projectReturn="save.php" randomiseOrder='true' poolSize="2" loudness="-23" playOne="true"> + <setup interface="AB" projectReturn="save.php" randomiseOrder="false" poolSize="2" loudness="-23" playOne="true"> <survey location="before"> <surveyquestion id="sessionId" mandatory="true"> <statement>Please enter your name.</statement> @@ -56,13 +56,14 @@ <page id='test-0' hostURL="media/example/" randomiseOrder='true' repeatCount='0' loop='false' loudness="-12"> <commentboxprefix>Comment on fragment</commentboxprefix> <interface> - <title>Depth</title> + <title>Which sounds most like a drum?</title> + <image src="https://upload.wikimedia.org/wikipedia/commons/0/0a/Drumkit-icon.png" /> </interface> <audioelement url="0.wav" id="track-0" /> <audioelement url="1.wav" id="track-1" /> <survey location="before"> <surveystatement id="test-0-intro"> - <statement>A two way comparison using randomised element order, automatic loudness and synchronised looping.</statement> + <statement>A two way comparison using randomised element order, automatic loudness and synchronised looping. Also an embedded image</statement> </surveystatement> </survey> <survey location="after">