diff interfaces/discrete.js @ 2428:78f2dbe417da

WIP #29
author Nicholas Jillings <n.g.r.jillings@se14.qmul.ac.uk>
date Fri, 27 May 2016 16:16:10 +0100
parents b7ed9d43ea87
children 1647bb807186
line wrap: on
line diff
--- a/interfaces/discrete.js	Fri May 27 16:37:17 2016 +0200
+++ b/interfaces/discrete.js	Fri May 27 16:16:10 2016 +0100
@@ -355,13 +355,21 @@
 		if (outsideReference != null) {
 			$(outsideReference).removeClass('track-slider-playing');
 		}
+        if (this.parent.specification.parent.playOne || specification.playOne) {
+            $('.track-slider-button').text = "Wait";
+            $('.track-slider-button').attr("disabled","true");
+        }
     }
     this.stopPlayback = function()
     {
         // Called by audioObject when playback stops
-        this.play.setAttribute("playstate","ready");
-        $(this.holder).removeClass('track-slider-playing');
-        this.play.textContent = "Play";
+        if (this.play.getAttribute("playstate") == "playing") {
+            this.play.setAttribute("playstate","ready");
+            $(this.holder).removeClass('track-slider-playing');
+            $('.track-slider-button').text = "Play";
+            this.play.textContent = "Play";
+            $('.track-slider-button').removeAttr("disabled");
+        }
     }
     
 	this.getValue = function()