comparison test_create/test_core.js @ 2911:bcb741f60298

#222 More dropdown labels and help
author Nicholas Jillings <n.g.r.jillings@se14.qmul.ac.uk>
date Tue, 01 Aug 2017 11:57:16 +0100
parents e2b241c88b74
children 7b6cdd27f3ee
comparison
equal deleted inserted replaced
2910:becd7e8e0a3a 2911:bcb741f60298
33 33
34 var specification = new Specification(); 34 var specification = new Specification();
35 35
36 window.onload = function () { 36 window.onload = function () {
37 // Get the test interface specifications 37 // Get the test interface specifications
38 toggleDropdowns();
39 };
40
41 function toggleDropdowns() {
38 $(function () { 42 $(function () {
39 $('[data-toggle="popover"]').popover(); 43 $('[data-toggle="popover"]').popover();
40 }); 44 });
41 }; 45 }
42 46
43 function handleFiles(event) { 47 function handleFiles(event) {
44 var s = angular.element(event.currentTarget).scope(); 48 var s = angular.element(event.currentTarget).scope();
45 s.handleFiles(event); 49 s.handleFiles(event);
46 s.$apply(); 50 s.$apply();
147 $s.showValidationMessages = true; 151 $s.showValidationMessages = true;
148 } 152 }
149 $s.hideValidationMessages = function () { 153 $s.hideValidationMessages = function () {
150 $s.showValidationMessages = false; 154 $s.showValidationMessages = false;
151 } 155 }
156 $s.$watch(function () {
157 return document.querySelectorAll("div.pageNode").length;
158 }, $w.toggleDropdowns);
159 $s.$watch(function () {
160 return document.querySelectorAll("div.surveyentry").length;
161 }, $w.toggleDropdowns);
162 $s.$watch(function () {
163 return document.querySelectorAll("div.interface").length;
164 }, $w.toggleDropdowns);
165 $s.$watch(function () {
166 return document.querySelectorAll("div.audioelement").length;
167 }, $w.toggleDropdowns);
152 }]); 168 }]);
153 169
154 AngularInterface.controller("introduction", ['$scope', '$element', '$window', function ($s, $e, $w) { 170 AngularInterface.controller("introduction", ['$scope', '$element', '$window', function ($s, $e, $w) {
155 $s.state = 0; 171 $s.state = 0;
156 $s.selected = undefined; 172 $s.selected = undefined;