# HG changeset patch # User Nicholas Jillings # Date 1493290948 -3600 # Node ID d432bf25889b5addb227a0348454f7ce125f1308 # Parent cffde1e75b2dcfd82c745774a1bf59f3f8fd3590 Finalised test_create UI diff -r cffde1e75b2d -r d432bf25889b js/specification.js --- a/js/specification.js Thu Apr 27 11:43:08 2017 +0100 +++ b/js/specification.js Thu Apr 27 12:02:28 2017 +0100 @@ -32,7 +32,7 @@ var newpage = new page(this); this.pages.push(newpage); return newpage; - } + }; var processAttribute = function (attribute, schema) { // attribute is the string returned from getAttribute on the XML @@ -218,7 +218,7 @@ var node = new this.OptionNode(this.specification); this.options.push(node); return node; - } + }; this.OptionNode = function (specification) { this.type = undefined; @@ -419,7 +419,7 @@ } return node; }; - }; + } function interfaceNode(specification) { this.title = undefined; @@ -513,7 +513,7 @@ } return node; }; - }; + } function metricNode() { this.enabled = []; @@ -538,7 +538,7 @@ } return node; }; - }; + } function page(specification) { this.presentedId = undefined; @@ -564,6 +564,22 @@ this.specification = specification; this.parent = undefined; + this.addInterface = function () { + var node = new interfaceNode(specification); + this.interfaces.push(node); + return node; + }; + this.addCommentQuestion = function () { + var node = new commentQuestionNode(specification); + this.commentQuestions.push(node); + return node; + }; + this.addAudioElement = function () { + var node = new audioElementNode(specification); + this.audioElements.push(node); + return node; + }; + this.decode = function (parent, xml) { this.parent = parent; var attributeMap = this.schema.querySelectorAll('attribute'); @@ -801,7 +817,7 @@ } return node; }; - }; + } function audioElementNode(specification) { this.url = undefined; @@ -864,6 +880,6 @@ }); return AENode; }; - }; - }; + } + } } diff -r cffde1e75b2d -r d432bf25889b test_create.html --- a/test_create.html Thu Apr 27 11:43:08 2017 +0100 +++ b/test_create.html Thu Apr 27 12:02:28 2017 +0100 @@ -1,1024 +1,1032 @@ - - - - - - - - - - - - - - WAET 1.2.1 Test Creator - - - -
-
-

Web Audio Evaluation Tool - Test Creator

-
-
-

Setup

-
-
- Interface: - -
-
- Save URL: - -
-
- Exit URL: - -
-
- Randomise Page Order: - -
-
- Page Pool Size: - -
-
- Loudness Normalisation (LUFS): - -
-
- Fixed Sampling Rate: - -
-
- Pre-Test audio calibration: - -
-
- Global Cross-fade time: - -
-
- Global Fragment Pre-Silence: - -
-
- Global Fragment Post-Silence: - -
-
- Play audio one-at-a-time: - -
-
-
-

Test Completed Message

- -
-
-

Session Metrics

-
-
- Collect Total Test Time: - -
-
- Collect Fragment Listen Time: - -
-
- Collect Fragment Initial Position: - -
-
- Collect Fragment Position over Time: - -
-
- Collect Fragment Listened To Flag: - -
-
- Collect Fragment Moved Flag: - -
-
- Collect Fragment Listened Flag: - -
-
-
-
-

Pre Test Survey

- -
-

Survey Entry

- -
-
- Survey Type: - -
-
- Unique Survey Entry ID: - -
-
- Entry Name: - -
-
- Mandatory: - -
-
- Minimum Wait Time (s): - -
-
- Box Size: - -
-
- Minimum Selected: - -
-
- Maximum Selected: - -
-
- Minimum Value: - -
-
- Maximum Value: - -
-
- Video URL: - -
-
-
-

Statement

- -
-
-

Options

-
- -
-
-
-
- -
-
- Name: - -
-
- Displayed Text: - -
-
-
-
-
-

Conditionals

- -
-
-
- -
-
- Check Type: - -
-
- Value: - -
-
- Jump To On Pass: - -
-
- Jump To On Fail: - -
-
-
-
-
-
-
-

Post Test Survey

- -
-

Survey Entry

- -
-
- Survey Type: - -
-
- Unique Survey Entry ID: - -
-
- Entry Name: - -
-
- Mandatory: - -
-
- Minimum Wait Time (s): - -
-
- Box Size: - -
-
- Minimum Selected: - -
-
- Maximum Selected: - -
-
- Minimum Value: - -
-
- Maximum Value: - -
-
- Video URL: - -
-
-
-

Statement

- -
-
-

Options

-
- -
-
-
-
- -
-
- Name: - -
-
- Displayed Text: - -
-
-
-
-
-

Conditionals

- -
-
-
- -
-
- Check Type: - -
-
- Value: - -
-
- Jump To On Pass: - -
-
- Jump To On Fail: - -
-
-
-
-
-
-
-

Interface (Globals)

-
-
-
- Check all fragments played: - -
-
- Check all fragments fully played: - -
-
- Check all fragments have been moved: - -
-
- Check all fragments have comments: - -
-
- Enforce a scale usage: - - Minimum: - - Maximum: - -
-
- Show master volume control: - -
-
- Show playhead: - -
-
- Show Page Count: - -
-
- Show Fragment Comments: - -
-
-
-
-
-
- -
-
-

Page

-
-
- Unique ID: - -
-
- Fragment common-root URL: - -
-
- Randomise Fragment Order: - -
-
- Repeat Page N-times: - -
-
- Loop audio: - -
-
- Synchronous audio playback: - -
-
- Loudness (page): - -
-
- Label type: - -
-
- Label Start: - -
-
- Fragment pool size: - -
-
- Always include page: - -
-
- Fixed Page Position: - -
-
- Fixed Page Position: - -
-
- Fragment pre-silence: - -
-
- Fragment post-silence: - -
-
- Cannot interupt audio: - -
-
- Only move playing audio: - -
-
-
-

Page Title

- -
-
-

Comment box text prefix

- -

Example: - {{page.commentboxprefix}} A -

-
-
-

Pre Page Survey

- -
-

Survey Entry

-
-
- Survey Type: - -
-
- Unique Survey Entry ID: - -
-
- Entry Name: - -
-
- Mandatory: - -
-
- Minimum Wait Time (s): - -
-
- Box Size: - -
-
- Minimum Selected: - -
-
- Maximum Selected: - -
-
- Minimum Value: - -
-
- Maximum Value: - -
-
- Video URL: - -
-
-
-

Statement

- -
-
-

Options

-
- -
-
-
-
- -
-
- Name: - -
-
- Displayed Text: - -
-
-
-
-
-

Conditionals

- -
-
-
- -
-
- Check Type: - -
-
- Value: - -
-
- Jump To On Pass: - -
-
- Jump To On Fail: - -
-
-
-
-
-
-
-

Post Page Survey

- -
-

Survey Entry

-
-
- Survey Type: - -
-
- Unique Survey Entry ID: - -
-
- Entry Name: - -
-
- Mandatory: - -
-
- Minimum Wait Time (s): - -
-
- Box Size: - -
-
- Minimum Selected: - -
-
- Maximum Selected: - -
-
- Minimum Value: - -
-
- Maximum Value: - -
-
- Video URL: - -
-
-
-

Statement

- -
-
-

Options

-
- -
-
-
-
- -
-
- Name: - -
-
- Displayed Text: - -
-
-
-
-
-

Conditionals

- -
-
-
- -
-
- Check Type: - -
-
- Value: - -
-
- Jump To On Pass: - -
-
- Jump To On Fail: - -
-
-
-
-
-
-
-

Interface

-
-
-
- Check all fragments played: - -
-
- Check all fragments fully played: - -
-
- Check all fragments have been moved: - -
-
- Check all fragments have comments: - -
-
- Enforce a scale usage: - - Minimum: - - Maximum: - -
-
- Show master volume control: - -
-
- Show playhead: - -
-
- Show Page Count: - -
-
- Show Fragment Comments: - -
-
-
-
-

Axis Title

- -
-
- Axis name (in saves): - -
-
-
-
-

Axis Image

- -
-
-

Axis Scales

- -
-
-
- -
-
- Position: - -
-
- Text: - -
-
-
-
-
-
-

Comment Questions

-
-
-
- Unique ID: - -
-
- Common Name: - -
-
- Minimum: - -
-
- Maximum: - -
-
- Step size: - -
-
- Initial Value: - -
-
-
-

Question:

- -
-
-

Options

-
-
-
- -
-
- Name: - -
-
- Display Text: - -
-
-
-
-
-
-
-

Audio Fragment

-
-
- Unique ID: - -
-
- URL: - - Full URL: {{page.hostURL}}{{fragment.url}} -
-
- Fragment Gain (dB): - -
-
- Fragment Label: - -
-
- Fragment Common name: - -
-
- Fragment Type: - -
-
- Anchor must be below: - -
-
- Reference must be above: - -
-
- Loudness: - -
-
- Always include fragment: - -
-
- Fragment Pre-Silence: - -
-
- Fragment Post-Silence: - -
-
- Fragment playback start position (s): - -
-
- Fragment playback stop position (s): - -
-
- Fragment sampling rate: - -
-
- Fragment Image (URL): - -
-
-
-
-
- -
-
-
- - - + + + + + + + + + + + + + + WAET 1.2.1 Test Creator + + + +
+
+

Web Audio Evaluation Tool - Test Creator

+
+
+

Setup

+
+
+ Interface: + +
+
+ Save URL: + +
+
+ Exit URL: + +
+
+ Randomise Page Order: + +
+
+ Page Pool Size: + +
+
+ Loudness Normalisation (LUFS): + +
+
+ Fixed Sampling Rate: + +
+
+ Pre-Test audio calibration: + +
+
+ Global Cross-fade time: + +
+
+ Global Fragment Pre-Silence: + +
+
+ Global Fragment Post-Silence: + +
+
+ Play audio one-at-a-time: + +
+
+
+

Test Completed Message

+ +
+
+

Session Metrics

+
+
+ Collect Total Test Time: + +
+
+ Collect Fragment Listen Time: + +
+
+ Collect Fragment Initial Position: + +
+
+ Collect Fragment Position over Time: + +
+
+ Collect Fragment Listened To Flag: + +
+
+ Collect Fragment Moved Flag: + +
+
+ Collect Fragment Listened Flag: + +
+
+
+
+

Pre Test Survey

+ +
+

Survey Entry

+ +
+
+ Survey Type: + +
+
+ Unique Survey Entry ID: + +
+
+ Entry Name: + +
+
+ Mandatory: + +
+
+ Minimum Wait Time (s): + +
+
+ Box Size: + +
+
+ Minimum Selected: + +
+
+ Maximum Selected: + +
+
+ Minimum Value: + +
+
+ Maximum Value: + +
+
+ Video URL: + +
+
+
+

Statement

+ +
+
+

Options

+
+ +
+
+
+
+ +
+
+ Name: + +
+
+ Displayed Text: + +
+
+
+
+
+

Conditionals

+ +
+
+
+ +
+
+ Check Type: + +
+
+ Value: + +
+
+ Jump To On Pass: + +
+
+ Jump To On Fail: + +
+
+
+
+
+
+
+

Post Test Survey

+ +
+

Survey Entry

+ +
+
+ Survey Type: + +
+
+ Unique Survey Entry ID: + +
+
+ Entry Name: + +
+
+ Mandatory: + +
+
+ Minimum Wait Time (s): + +
+
+ Box Size: + +
+
+ Minimum Selected: + +
+
+ Maximum Selected: + +
+
+ Minimum Value: + +
+
+ Maximum Value: + +
+
+ Video URL: + +
+
+
+

Statement

+ +
+
+

Options

+
+ +
+
+
+
+ +
+
+ Name: + +
+
+ Displayed Text: + +
+
+
+
+
+

Conditionals

+ +
+
+
+ +
+
+ Check Type: + +
+
+ Value: + +
+
+ Jump To On Pass: + +
+
+ Jump To On Fail: + +
+
+
+
+
+
+
+

Interface (Globals)

+
+
+
+ Check all fragments played: + +
+
+ Check all fragments fully played: + +
+
+ Check all fragments have been moved: + +
+
+ Check all fragments have comments: + +
+
+ Enforce a scale usage: + + Minimum: + + Maximum: + +
+
+ Show master volume control: + +
+
+ Show playhead: + +
+
+ Show Page Count: + +
+
+ Show Fragment Comments: + +
+
+
+
+
+
+ +
+
+

Page

+
+
+ Unique ID: + +
+
+ Fragment common-root URL: + +
+
+ Randomise Fragment Order: + +
+
+ Repeat Page N-times: + +
+
+ Loop audio: + +
+
+ Synchronous audio playback: + +
+
+ Loudness (page): + +
+
+ Label type: + +
+
+ Label Start: + +
+
+ Fragment pool size: + +
+
+ Always include page: + +
+
+ Fixed Page Position: + +
+
+ Fixed Page Position: + +
+
+ Fragment pre-silence: + +
+
+ Fragment post-silence: + +
+
+ Cannot interupt audio: + +
+
+ Only move playing audio: + +
+
+
+

Page Title

+ +
+
+

Comment box text prefix

+ +

Example: + {{page.commentboxprefix}} A +

+
+
+

Pre Page Survey

+ +
+

Survey Entry

+ +
+
+ Survey Type: + +
+
+ Unique Survey Entry ID: + +
+
+ Entry Name: + +
+
+ Mandatory: + +
+
+ Minimum Wait Time (s): + +
+
+ Box Size: + +
+
+ Minimum Selected: + +
+
+ Maximum Selected: + +
+
+ Minimum Value: + +
+
+ Maximum Value: + +
+
+ Video URL: + +
+
+
+

Statement

+ +
+
+

Options

+
+ +
+
+
+
+ +
+
+ Name: + +
+
+ Displayed Text: + +
+
+
+
+
+

Conditionals

+ +
+
+
+ +
+
+ Check Type: + +
+
+ Value: + +
+
+ Jump To On Pass: + +
+
+ Jump To On Fail: + +
+
+
+
+
+
+
+

Post Page Survey

+ +
+

Survey Entry

+ +
+
+ Survey Type: + +
+
+ Unique Survey Entry ID: + +
+
+ Entry Name: + +
+
+ Mandatory: + +
+
+ Minimum Wait Time (s): + +
+
+ Box Size: + +
+
+ Minimum Selected: + +
+
+ Maximum Selected: + +
+
+ Minimum Value: + +
+
+ Maximum Value: + +
+
+ Video URL: + +
+
+
+

Statement

+ +
+
+

Options

+
+ +
+
+
+
+ +
+
+ Name: + +
+
+ Displayed Text: + +
+
+
+
+
+

Conditionals

+ +
+
+
+ +
+
+ Check Type: + +
+
+ Value: + +
+
+ Jump To On Pass: + +
+
+ Jump To On Fail: + +
+
+
+
+
+
+ +
+

Interface

+ +
+
+
+ Check all fragments played: + +
+
+ Check all fragments fully played: + +
+
+ Check all fragments have been moved: + +
+
+ Check all fragments have comments: + +
+
+ Enforce a scale usage: + + Minimum: + + Maximum: + +
+
+ Show master volume control: + +
+
+ Show playhead: + +
+
+ Show Page Count: + +
+
+ Show Fragment Comments: + +
+
+
+
+

Axis Title

+ +
+
+ Axis name (in saves): + +
+
+
+
+

Axis Image

+ +
+
+

Axis Scales

+ +
+
+
+ +
+
+ Position: + +
+
+ Text: + +
+
+
+
+
+
+

Comment Questions

+ +
+ +
+
+ Unique ID: + +
+
+ Common Name: + +
+
+ Minimum: + +
+
+ Maximum: + +
+
+ Step size: + +
+
+ Initial Value: + +
+
+
+

Question:

+ +
+
+

Options

+
+
+
+ +
+
+ Name: + +
+
+ Display Text: + +
+
+
+
+
+
+ +
+

Audio Fragment

+ +
+
+ Unique ID: + +
+
+ URL: + + Full URL: {{page.hostURL}}{{fragment.url}} +
+
+ Fragment Gain (dB): + +
+
+ Fragment Label: + +
+
+ Fragment Common name: + +
+
+ Fragment Type: + +
+
+ Anchor must be below: + +
+
+ Reference must be above: + +
+
+ Loudness: + +
+
+ Always include fragment: + +
+
+ Fragment Pre-Silence: + +
+
+ Fragment Post-Silence: + +
+
+ Fragment playback start position (s): + +
+
+ Fragment playback stop position (s): + +
+
+ Fragment sampling rate: + +
+
+ Fragment Image (URL): + +
+
+
+
+
+ +
+
+
+ + + diff -r cffde1e75b2d -r d432bf25889b test_create/test_core.js --- a/test_create/test_core.js Thu Apr 27 11:43:08 2017 +0100 +++ b/test_create/test_core.js Thu Apr 27 12:02:28 2017 +0100 @@ -56,7 +56,7 @@ $s.addPage = function () { $s.specification.createNewPage(); - } + }; }]); AngularInterface.controller("introduction", ['$scope', '$element', '$window', function ($s, $e, $w) { @@ -255,4 +255,42 @@ }); }; }]); -AngularInterface.controller("page", ['$scope', '$element', '$window', function ($s, $e, $w) {}]); +AngularInterface.controller("page", ['$scope', '$element', '$window', function ($s, $e, $w) { + $s.addInterface = function () { + $s.page.addInterface(); + }; + $s.removeInterface = function (node) { + var index = $s.page.interfaces.findIndex(function (a) { + return a == node; + }); + if (index === -1) { + throw ("Invalid node"); + } + $s.page.interfaces.splice(index, 1); + }; + + $s.addCommentQuestion = function () { + $s.page.addCommentQuestion(); + }; + $s.removeCommentQuestion = function (node) { + var index = $s.page.commentQuestions.findIndex(function (a) { + return a == node; + }); + if (index === -1) { + throw ("Invalid node"); + } + $s.page.commentQuestions.splice(index, 1); + }; + $s.addAudioElement = function () { + $s.page.addAudioElement(); + }; + $s.removeAudioElement = function (element) { + var index = $s.page.audioElements.findIndex(function (a) { + return a == element; + }); + if (index === -1) { + throw ("Invalid node"); + } + $s.page.audioElements.splice(index, 1); + }; +}]);