annotate test_create/test_create.html @ 921:533d51508e93

Stash for project creator
author Nicholas Jillings <n.g.r.jillings@se14.qmul.ac.uk>
date Mon, 01 Jun 2015 12:55:21 +0100
parents
children 95ff666edb66
rev   line source
n@921 1 <!DOCTYPE html>
n@921 2 <html lang="en">
n@921 3 <head>
n@921 4 <meta charset="utf-8">
n@921 5
n@921 6 <!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame
n@921 7 Remove this if you use the .htaccess -->
n@921 8 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
n@921 9
n@921 10 <title>WAET Create Test</title>
n@921 11 <meta name="description" content="">
n@921 12 <meta name="author" content="">
n@921 13
n@921 14 <meta name="viewport" content="width=device-width; initial-scale=1.0">
n@921 15
n@921 16 <script type="text/javascript">
n@921 17 // To aid 'one-page set-up' all scripts and CSS must be included directly in this file!
n@921 18 var topLevel;
n@921 19 window.onload = function() {
n@921 20 // Initialise page
n@921 21 topLevel = document.getElementById('topLevelBody');
n@921 22 var setup = document.createElement('div');
n@921 23 setup.id = 'setupTagDiv';
n@921 24
n@921 25 };
n@921 26
n@921 27 function attributePair(string, type){
n@921 28 var id = document.createElement("span");
n@921 29 id.textContent = string;
n@921 30 var input = document.createElement("input");
n@921 31 input.type = type;
n@921 32 return [id, input];
n@921 33 }
n@921 34
n@921 35 function questionNode() {
n@921 36 var node = document.createElement("div");
n@921 37 node.setAttribute('class','head');
n@921 38 node.setAttribute('name','question-node');
n@921 39 var nodeTitle = document.createElement("span");
n@921 40 nodeTitle.textContent = "Question";
n@921 41 var attributes = document.createElement("div");
n@921 42 attributes.setAttribute('class','attrib');
n@921 43 var id = attributePair("ID:","text");
n@921 44 var question = attributePair("Question:","text");
n@921 45 node.appendChild(nodeTitle);
n@921 46 id.forEach(function(item){attributes.appendChild(item);},false);
n@921 47 question.forEach(function(item){attributes.appendChild(item);},false);
n@921 48 node.appendChild(attributes);
n@921 49 return node;
n@921 50 }
n@921 51
n@921 52 function statementNode() {
n@921 53 var node = document.createElement("div");
n@921 54 node.setAttribute('class','head');
n@921 55 node.setAttribute('name','question-node');
n@921 56 var nodeTitle = document.createElement("span");
n@921 57 nodeTitle.textContent = "Statement";
n@921 58 var attributes = document.createElement("div");
n@921 59 attributes.setAttribute('class','attrib');
n@921 60 var statement = attributePair("Statement:","text");
n@921 61 node.appendChild(nodeTitle);
n@921 62 statement.forEach(function(item){attributes.appendChild(item);},false);
n@921 63 node.appendChild(attributes);
n@921 64 return node;
n@921 65 }
n@921 66
n@921 67 function audioHolderNode() {
n@921 68 var audioHolderCounts = document.getElementsByName("audio-holder").length;
n@921 69 var node = document.createElement("div");
n@921 70 node.setAttribute("class","head");
n@921 71 node.setAttribute("name","audio-holder");
n@921 72 node.setAttribute("id","audio-holder-"+length);
n@921 73 var nodeTitle = document.createElement("span");
n@921 74 nodeTitle.textContent = "Audio Holder "+(length+1);
n@921 75
n@921 76 var attributes = document.createElement("div");
n@921 77 attributes.setAttribute('class','attrib');
n@921 78 var id = attributePair("ID:","text");
n@921 79 id[1].value=length;
n@921 80 }
n@921 81 </script>
n@921 82 <style>
n@921 83 div {
n@921 84 padding: 2px;
n@921 85 margin-top: 2px;
n@921 86 margin-bottom: 2px;
n@921 87 }
n@921 88 div.head{
n@921 89 margin-left: 10px;
n@921 90 border: black;
n@921 91 border-width: 2px;
n@921 92 border-style: solid;
n@921 93 }
n@921 94 div.attrib{
n@921 95 margin-left:25px;
n@921 96 border: black;
n@921 97 border-width: 2px;
n@921 98 border-style: dashed;
n@921 99 margin-bottom: 10px;
n@921 100 }
n@921 101 </style>
n@921 102
n@921 103 </head>
n@921 104
n@921 105 <body>
n@921 106 <h1>Create Test Setup XML</h1>
n@921 107 <div id="topLevelBody" align="left">
n@921 108 <!-- Interface goes here -->
n@921 109 <div name='test-setup'>
n@921 110 <div id="setup" class="head">
n@921 111 <h2>Setup Tag</h2>
n@921 112 <div id="setup-attribs" class="attrib">
n@921 113 <span>Interface</span>
n@921 114 <select id="interface">
n@921 115 <option value='APE'>APE</option>
n@921 116 </select>
n@921 117 <span>Project Return</span>
n@921 118 <input type="text" id="projectReturn">
n@921 119 <span>Randomise Test Page Order</span>
n@921 120 <input id="randomisePageOrder" type="checkbox" value="false">
n@921 121 <span>Collect Session Metrics</span>
n@921 122 <input id="collectMetrics" type="checkbox">
n@921 123 </div>
n@921 124 <div id="globalPreTest" class="head">
n@921 125 <h3>Pre Test</h3>
n@921 126 <button id="addPreTestQ" onclick="event.srcElement.parentElement.appendChild(questionNode());">Add Pre Test Question</button>
n@921 127 <button id="addPreTestS" onclick="event.srcElement.parentElement.appendChild(statementNode());">Add Pre Test Statement</button>
n@921 128 </div>
n@921 129 <div id="globalPostTest" class="head">
n@921 130 <h3>Post Test</h3>
n@921 131 <button id="addPreTestQ" onclick="event.srcElement.parentElement.appendChild(questionNode());">Add Post Test Question</button>
n@921 132 <button id="addPreTestS" onclick="event.srcElement.parentElement.appendChild(statementNode());">Add Post Test Statement</button>
n@921 133 </div>
n@921 134 <div id="globalMetric" class="head">
n@921 135 <h3>Global Metrics</h3>
n@921 136 <div id="globalMetric-attrib" class="attrib">
n@921 137 <span>Test Timer</span>
n@921 138 <input type="checkbox" id="testTimer" />
n@921 139 <span>Element Playback Timer</span>
n@921 140 <input type="checkbox" id="elementTimer" />
n@921 141 <span>Element Initial Position</span>
n@921 142 <input type="checkbox" id="elementInitialPosition" />
n@921 143 <span>Element Tracker</span>
n@921 144 <input type="checkbox" id="elementTracker" />
n@921 145 <span>Element Flag Listened To</span>
n@921 146 <input type="checkbox" id="elementFlagListened" />
n@921 147 <span>Element Flag Moved</span>
n@921 148 <input type="checkbox" id="elementFlagMoved" />
n@921 149 </div>
n@921 150 </div>
n@921 151 <button id="addAudioHolder">Add AudioHolder / Test Page</button>
n@921 152 </div>
n@921 153 </div>
n@921 154 </div>
n@921 155 </body>
n@921 156 </html>