changeset 2540:6ff61a4f62a8

Reincluded missing checkAllCommented function from interfaceContext.
author Nicholas Jillings <nicholas.jillings@mail.bcu.ac.uk>
date Mon, 14 Nov 2016 14:41:12 +0000
parents 464c6c6692d6
children b5cb6ceb2022 acec3c5b7477 1c8aac0ee5e9
files js/core.js
diffstat 1 files changed, 16 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/js/core.js	Mon Nov 14 14:17:03 2016 +0000
+++ b/js/core.js	Mon Nov 14 14:41:12 2016 +0000
@@ -3047,6 +3047,22 @@
         this.storeErrorNode(str);
         return false;
     };
+    this.checkAllCommented = function () {
+        var str = "You have not commented on all the fragments.";
+        var cont = true,
+            boxes = this.commentBoxes.boxes,
+            numBoxes = boxes.length,
+            i;
+        for (i = 0; i < numBoxes; i++) {
+            if (boxes[i].trackCommentBox.value === "") {
+                interfaceContext.lightbox.post("Error", str);
+                console.log(str);
+                this.storeErrorNode(str);
+                return false;
+            }
+        }
+        return true;
+    }
     this.checkScaleRange = function (min, max) {
         var page = testState.getCurrentTestPage();
         var audioObjects = audioEngineContext.audioObjects;