Mercurial > hg > webaudioevaluationtool
changeset 2732:d999a8fc26ea
#174: Fixed AB playback button text and locking
author | Nicholas Jillings <nicholas.jillings@mail.bcu.ac.uk> |
---|---|
date | Wed, 19 Apr 2017 10:26:56 +0100 |
parents | a13adc8f8d3d |
children | f2bb15d5f5c9 23868d69c452 |
files | interfaces/AB.js |
diffstat | 1 files changed, 7 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/interfaces/AB.js Wed Apr 19 09:30:06 2017 +0100 +++ b/interfaces/AB.js Wed Apr 19 10:26:56 2017 +0100 @@ -288,7 +288,7 @@ if (this.parent.specification.parent.playOne || specification.playOne) { $('.comparator-button').text('Wait'); $('.comparator-button').attr("disabled", "true"); - $(this.playback).css("disabled", "false"); + $(this.playback).removeAttr("disabled"); } else { $('.comparator-button').text('Listen'); } @@ -298,9 +298,13 @@ }; this.stopPlayback = function () { if (this.playback.getAttribute("playstate") == "playing") { - $('.comparator-button').text('Listen'); - $('.comparator-button').removeAttr("disabled"); + $(this.playback).text('Listen'); + $(this.playback).removeAttr("disabled"); this.playback.setAttribute("playstate", "ready"); + if (this.parent.specification.parent.playOne || specification.playOne) { + $('.comparator-button').text('Listen'); + $('.comparator-button').removeAttr("disabled"); + } } var box = interfaceContext.commentBoxes.boxes.find(function (a) { return a.id === audioElement.id;