changeset 510:ea97b12c1f1e Dev_main

Bug #1564: index.html is blank, the links are included in demo.html. Popup now created in index.html rather than generated.
author Nicholas Jillings <n.g.r.jillings@se14.qmul.ac.uk>
date Thu, 11 Feb 2016 16:54:33 +0000
parents e3ff10a1ebc5
children 01319bf379ea
files core.css core.js demo.html index.html
diffstat 4 files changed, 77 insertions(+), 66 deletions(-) [+]
line wrap: on
line diff
--- a/core.css	Thu Feb 11 14:37:26 2016 +0000
+++ b/core.css	Thu Feb 11 16:54:33 2016 +0000
@@ -42,6 +42,27 @@
 	border-radius: 10px;
 	box-shadow: 0px 0px 50px #000;
 	z-index: 2;
+    position: absolute;
+}
+
+div#popupContent {
+    margin-top: 20px;
+    margin-bottom: 5px;
+}
+
+div#popupTitle {
+    width: inherit;
+    min-height: 25px;
+    max-height: 250px;
+    overflow: auto;
+    margin-bottom: 5px;
+}
+
+div#popupResponse {
+    width: inherit;
+    min-height: 50px;
+    max-height: 320px;
+    overflow: auto;
 }
 
 button.popupButton {
--- a/core.js	Thu Feb 11 14:37:26 2016 +0000
+++ b/core.js	Thu Feb 11 16:54:33 2016 +0000
@@ -440,66 +440,27 @@
 	this.createPopup = function(){
 		// Create popup window interface
 		var insertPoint = document.getElementById("topLevelBody");
-		var blank = document.createElement('div');
-		blank.className = 'testHalt';
 		
-		this.popup = document.createElement('div');
-		this.popup.id = 'popupHolder';
-		this.popup.className = 'popupHolder';
-		this.popup.style.position = 'absolute';
+		this.popup = document.getElementById('popupHolder');
 		this.popup.style.left = (window.innerWidth/2)-250 + 'px';
 		this.popup.style.top = (window.innerHeight/2)-125 + 'px';
 		
-		this.popupContent = document.createElement('div');
-		this.popupContent.id = 'popupContent';
-		this.popupContent.style.marginTop = '20px';
-		this.popupContent.style.marginBottom = '5px';
-		this.popup.appendChild(this.popupContent);
+		this.popupContent = document.getElementById('popupContent');
 		
-		var titleHolder = document.createElement('div');
-		titleHolder.id = 'popupTitleHolder';
-		titleHolder.align = 'center';
-		titleHolder.style.width = 'inherit';
-		titleHolder.style.minHeight = '25px';
-		titleHolder.style.maxHeight = '250px';
-		titleHolder.style.overflow = 'auto';
-		titleHolder.style.marginBottom = '5px';
+		this.popupTitle = document.getElementById('popupTitle');
 		
-		this.popupTitle = document.createElement('span');
-		this.popupTitle.id = 'popupTitle';
-		titleHolder.appendChild(this.popupTitle);
-		this.popupContent.appendChild(titleHolder);
+		this.popupResponse = document.getElementById('popupResponse');
 		
-		this.popupResponse = document.createElement('div');
-		this.popupResponse.id = 'popupResponse';
-		this.popupResponse.align = 'center';
-		this.popupResponse.style.width = 'inherit';
-		this.popupResponse.style.minHeight = '50px';
-		this.popupResponse.style.maxHeight = '320px';
-		this.popupResponse.style.overflow = 'auto';
-		this.popupContent.appendChild(this.popupResponse);
-		
-		this.buttonProceed = document.createElement('button');
-        this.buttonProceed.id = "popup-proceed";
-		this.buttonProceed.className = 'popupButton';
-		this.buttonProceed.innerHTML = 'Next';
+		this.buttonProceed = document.getElementById('popup-proceed');
 		this.buttonProceed.onclick = function(){popup.proceedClicked();};
 		
-		this.buttonPrevious = document.createElement('button');
-        this.buttonPrevious.id = "popup-previous";
-		this.buttonPrevious.className = 'popupButton';
-		this.buttonPrevious.innerHTML = 'Back';
+		this.buttonPrevious = document.getElementById('popup-previous');
 		this.buttonPrevious.onclick = function(){popup.previousClick();};
 		
-		this.popup.appendChild(this.buttonPrevious);
-		this.popup.appendChild(this.buttonProceed);
-		
+        this.hidePopup();
+        
 		this.popup.style.zIndex = -1;
 		this.popup.style.visibility = 'hidden';
-		blank.style.zIndex = -2;
-		blank.style.visibility = 'hidden';
-		insertPoint.appendChild(this.popup);
-		insertPoint.appendChild(blank);
 	};
 	
 	this.showPopup = function(){
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/demo.html	Thu Feb 11 16:54:33 2016 +0000
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<html lang="en">
+	<head>
+		<meta charset="utf-8" />
+		<!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame
+		Remove this if you use the .htaccess -->
+		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
+
+		<title>Web Audio Evaluation Tool</title>
+		<meta name="description" content="" />
+		<meta name="author" content="" />
+
+		<!-- Use jQuery hosted from Google CDN -->
+		<!--<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>-->
+		<script src="jquery-2.1.4.js"></script>
+	</head>
+
+	<body>
+		<div id='topLevelBody'>
+			<h1>Web Audio Evaluation Tool</h1>
+			<h2>Start menu </h2>
+			<ul>
+				<li><a href="index.html?url=example_eval/project.xml" target="_blank">APE interface test example</a></li>
+				<li><a href="index.html?url=example_eval/mushra_example.xml" target="_blank">MUSHRA interface test example</a></li>
+				<li><a href="index.html?url=example_eval/AB_example.xml" target="_blank">AB interface test example</a></li>
+				<li><a href="test_create/test_create.html" target="_blank">Test creator</a></li>
+				<li><a href="analyse.html" target="_blank">Analysis and diagnostics of results</a></li>
+			</ul>
+			<br>
+			<ul>
+				<li><a href="LICENSE.txt" target="_blank">License</a></li>
+				<li><a href="CITING.txt" target="_blank">Citing</a></li>
+				<li><a href="docs/Instructions/Instructions.pdf" target="_blank">Instructions</a></li>
+			</ul>
+		</div>
+	</body>
+</html>
--- a/index.html	Thu Feb 11 14:37:26 2016 +0000
+++ b/index.html	Thu Feb 11 16:54:33 2016 +0000
@@ -49,25 +49,17 @@
 		<!-- Load up the default page interface allowing for project setting loads, even if hard-coded-->
 		<!-- Actual test interface design should be contained in the .js for ease of dynamic content-->
 		<div id='topLevelBody'>
-			<h1>Web Audio Evaluation Tool</h1>
-			<h2>Start menu </h2>
-			<ul>
-				<li><a href="index.html?url=example_eval/project.xml" target="_blank">APE interface test example</a></li>
-				<li><a href="index.html?url=example_eval/mushra_example.xml" target="_blank">MUSHRA interface test example</a></li>
-				<li><a href="index.html?url=example_eval/AB_example.xml" target="_blank">AB interface test example</a></li>
-				<li><a href="test_create/test_create.html" target="_blank">Test creator</a></li>
-				<li><a href="analyse.html" target="_blank">Analysis and diagnostics of results</a></li>
-			</ul>
-
-			<br>
-
-			<ul>
-				<li><a href="LICENSE.txt" target="_blank">License</a></li>
-				<li><a href="CITING.txt" target="_blank">Citing</a></li>
-				<li><a href="docs/Instructions/Instructions.pdf" target="_blank">Instructions</a></li>
-			</ul>
-
-
 		</div>
+        <div id="popupHolder" class="popupHolder">
+            <div id="popupContent">
+                <div id="popupTitleHolder" align="center">
+                    <span id="popupTitle"></span>
+                </div>
+                <div id="popupResponse" align="center"></div>
+            </div>
+            <button id="popup-proceed" class="popupButton">Next</button>
+            <button id="popup-previous" class="popupButton">Back</button>
+        </div>
+        <div class="testHalt" style="visibility: hidden; z-index: -2"></div>
 	</body>
 </html>