From 91e5270937307e9613e3eb2f3156e084f37b5327 Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Tue, 11 Sep 2018 10:01:33 -0400 Subject: show save option only if event is playing --- www/js/EventModalCtrl.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'www/js/EventModalCtrl.js') diff --git a/www/js/EventModalCtrl.js b/www/js/EventModalCtrl.js index 2b0edb50..cf77aa3d 100644 --- a/www/js/EventModalCtrl.js +++ b/www/js/EventModalCtrl.js @@ -587,8 +587,13 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro sendCommand('1', $scope.connKey). then(function (resp) { - // console.log ("PAUSE ANSWER IS " + JSON.stringify(resp)); - $scope.currentProgress.progress = resp.data.status.progress; + console.log ("PAUSE ANSWER IS " + JSON.stringify(resp)); + + if (resp && resp.data && resp.data.status) + $scope.currentProgress.progress = resp.data.status.progress; + else + $scope.currentProgress.progress = 100; + // console.log ("STEP 0 progress is " + $scope.currentProgress.progress); $scope.slides = []; -- cgit v1.2.3