# HG changeset patch # User Nicholas Jillings # Date 1493289788 -3600 # Node ID cffde1e75b2dcfd82c745774a1bf59f3f8fd3590 # Parent 80a3b693b3f66375291a7c2e6cffb4d83dbea20e Test create: Completed setup node diff -r 80a3b693b3f6 -r cffde1e75b2d test_create.html --- a/test_create.html Thu Apr 27 11:24:16 2017 +0100 +++ b/test_create.html Thu Apr 27 11:43:08 2017 +0100 @@ -108,11 +108,12 @@ -
+

Pre Test Survey

- -
+ +

Survey Entry

+
Survey Type: @@ -223,14 +224,14 @@ Jump To On Pass:
Jump To On Fail:
@@ -238,11 +239,12 @@
-
+

Post Test Survey

- -
+ +

Survey Entry

+
Survey Type: @@ -353,14 +355,14 @@ Jump To On Pass:
Jump To On Fail:
diff -r 80a3b693b3f6 -r cffde1e75b2d test_create/test_core.js --- a/test_create/test_core.js Thu Apr 27 11:24:16 2017 +0100 +++ b/test_create/test_core.js Thu Apr 27 11:43:08 2017 +0100 @@ -150,6 +150,21 @@ }; }]); +AngularInterface.controller("survey", ['$scope', '$element', '$window', function ($s, $e, $w) { + $s.addSurveyEntry = function () { + $s.survey.addOption(); + }; + $s.removeSurveyEntry = function (entry) { + var index = $s.survey.options.findIndex(function (a) { + return a == entry; + }); + if (index === -1) { + throw ("Invalid Entry"); + } + $s.survey.options.splice(index, 1); + }; +}]); + AngularInterface.controller("surveyOption", ['$scope', '$element', '$window', function ($s, $e, $w) { $s.removeOption = function (option) {