# HG changeset patch # User Nicholas Jillings # Date 1463735707 -3600 # Node ID 737e3f18e32bea8f4be4bd3dbaf6f1a74eb04421 # Parent e04f0f8b6f8fe6daf492839d35385a3d48c669c6 #90 Specification.js follows strict js. diff -r e04f0f8b6f8f -r 737e3f18e32b js/specification.js --- a/js/specification.js Fri May 20 09:51:35 2016 +0100 +++ b/js/specification.js Fri May 20 10:15:07 2016 +0100 @@ -1,15 +1,25 @@ function Specification() { // Handles the decoding of the project specification XML into a simple JavaScript Object. + // attributes this.interface = null; this.projectReturn = null; this.returnURL = null; this.randomiseOrder = null; - this.testPages = null; + this.poolSize = null; + this.loudness = null; + this.sampleRate = null; + this.calibration = null; + this.crossFade = null; + this.preSilence = null; + this.postSilence = null; + + // nodes + this.metrics = null; + this.preTest = undefined; + this.postTest = undefined; this.pages = []; - this.metrics = null; this.interfaces = null; - this.loudness = null; this.errors = []; this.schema = null; this.exitText = "Thank you."; @@ -75,9 +85,8 @@ var schemaSetup = this.schema.getAllElementsByName('setup')[0]; // First decode the attributes var attributes = schemaSetup.getAllElementsByTagName('xs:attribute'); - for (var i in attributes) + for (var i=0; i