changeset 3021:a5a6c44bab6e

Added showBackButton to test create
author Nicholas Jillings <nicholas.jillings@mail.bcu.ac.uk>
date Tue, 12 Sep 2017 15:36:10 +0100
parents 664065577426
children c29ef0cc741f
files js/specification.js test_create.html
diffstat 2 files changed, 25 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/js/specification.js	Tue Sep 12 15:28:22 2017 +0100
+++ b/js/specification.js	Tue Sep 12 15:36:10 2017 +0100
@@ -425,6 +425,7 @@
         this.encode = function (doc) {
             var node = doc.createElement('survey');
             node.setAttribute('location', this.location);
+            node.setAttribute('showBackButton', this.showBackButton);
             for (var i = 0; i < this.options.length; i++) {
                 node.appendChild(this.options[i].exportXML(doc));
             }
--- a/test_create.html	Tue Sep 12 15:28:22 2017 +0100
+++ b/test_create.html	Tue Sep 12 15:36:10 2017 +0100
@@ -142,6 +142,12 @@
             </div>
             <div id="globalpresurvey" class="node" ng-controller="survey" ng-init="survey = specification.preTest">
                 <h2>Pre Test Survey</h2>
+                <div class="attributes">
+                    <div class="attribute" data-container="body" data-toggle="popover" data-placement="bottom" data-trigger="hover" data-content="Allow users to go both back and forward in the test">
+                        <span>Show back button: </span>
+                        <input type="checkbox" ng-model="survey.showBackButton" />
+                    </div>
+                </div>
                 <button type="button" class="btn btn-success" ng-click="addSurveyEntry()">Add Entry</button>
                 <div class="node surveyentry" ng-repeat="opt in survey.options" ng-controller="surveyOption">
                     <h3>Survey Entry</h3>
@@ -273,6 +279,12 @@
             </div>
             <div id="globalpostsurvey" class="node" ng-controller="survey" ng-init="survey = specification.postTest">
                 <h2>Post Test Survey</h2>
+                <div class="attributes">
+                    <div class="attribute" data-container="body" data-toggle="popover" data-placement="bottom" data-trigger="hover" data-content="Allow users to go both back and forward in the test">
+                        <span>Show back button: </span>
+                        <input type="checkbox" ng-model="survey.showBackButton" />
+                    </div>
+                </div>
                 <button type="button" class="btn btn-success" ng-click="addSurveyEntry()">Add Entry</button>
                 <div class="node surveyentry" ng-repeat="opt in survey.options" ng-controller="surveyOption">
                     <h3>Survey Entry</h3>
@@ -550,6 +562,12 @@
             </div>
             <div class="node" ng-controller="survey" ng-init="survey = page.preTest">
                 <h2>Pre Page Survey</h2>
+                <div class="attributes">
+                    <div class="attribute" data-container="body" data-toggle="popover" data-placement="bottom" data-trigger="hover" data-content="Allow users to go both back and forward in the test">
+                        <span>Show back button: </span>
+                        <input type="checkbox" ng-model="survey.showBackButton" />
+                    </div>
+                </div>
                 <button type="button" class="btn btn-success" ng-click="addSurveyEntry()">Add Entry</button>
                 <div class="node surveyentry" ng-repeat="opt in survey.options" ng-controller="surveyOption">
                     <h3>Survey Entry</h3>
@@ -681,6 +699,12 @@
             </div>
             <div class="node" ng-controller="survey" ng-init="survey = page.postTest">
                 <h2>Post Page Survey</h2>
+                <div class="attributes">
+                    <div class="attribute" data-container="body" data-toggle="popover" data-placement="bottom" data-trigger="hover" data-content="Allow users to go both back and forward in the test">
+                        <span>Show back button: </span>
+                        <input type="checkbox" ng-model="survey.showBackButton" />
+                    </div>
+                </div>
                 <button type="button" class="btn btn-success" ng-click="addSurveyEntry()">Add Entry</button>
                 <div class="node surveyentry" ng-repeat="opt in survey.options" ng-controller="surveyOption">
                     <h3>Survey Entry</h3>