Moved code related to time remaining functionality to a new branch in order to submit the master branch to the Marketplace.

This commit is contained in:
William Brawner 2015-11-22 09:56:16 -06:00
parent 6845851039
commit 6eb8fd5e1a
2 changed files with 0 additions and 16 deletions

View file

@ -24,9 +24,6 @@
<a id="pause" ng-show="timerActive" ng-click="pauseTimer()" class="control-button" href="#"><i class="fa fa-pause"></i></a>
<a id="next" ng-click="stepForward()" class="control-button" href="#"><i class="fa fa-step-forward"></i></a>
</div>
<div class="timer-info">
<p class="time-info">Time Remaining: {{ timeRemaining | date : "mm:ss" }}</p>
</div>
</div>
<div class="menu-bottom">
<a href="#" ng-click="settingsOpen = true; closeSettings = false;" id="timer-menu-btn" class="menu-button"><i class="fa fa-hourglass-o"></i></a>

View file

@ -52,15 +52,6 @@
$scope.time = $scope.timer.warmUpTime;
$scope.settingsOpen = false;
$scope.closeSettings = false;
$scope.getTimeRemaining = function() {
var totalWarmUpTime = $scope.timer.warmUpTime * $scope.timer.cycles;
var totalLowIntensityTime = ($scope.timer.lowIntensityTime * $scope.timer.cycles * $scope.timer.rounds) - ($scope.round * $scope.timer.lowIntensityTime) - ($scope.timer.rounds * $scope.cycle * $scope.timer.lowIntensityTime);
var totalHighIntensityTime = ($scope.timer.highIntensityTime * $scope.timer.cycles * $scope.timer.rounds) - ($scope.round * $scope.timer.highIntensityTime) - ($scope.timer.rounds * $scope.cycle * $scope.timer.highIntensityTime);
var totalCoolDownTime = $scope.timer.coolDownTime;
return (totalWarmUpTime + totalLowIntensityTime + totalHighIntensityTime + totalCoolDownTime) * 1000;
}
$scope.timeRemaining = $scope.getTimeRemaining();
console.log($scope.timeRemaining);
$scope.setWarmUp = function() {
clearInterval($scope.countdown);
$scope.warmUp = true;
@ -95,7 +86,6 @@
};
$scope.$apply(function() {
$scope.time--;
$scope.timeRemaining = $scope.getTimeRemaining();
});
};
$scope.startCoolDown = function() {
@ -105,7 +95,6 @@
};
$scope.$apply(function() {
$scope.time--;
$scope.timeRemaining = $scope.getTimeRemaining();
});
};
$scope.startLowIntensity = function() {
@ -115,7 +104,6 @@
};
$scope.$apply(function() {
$scope.time--;
$scope.timeRemaining = $scope.getTimeRemaining();
});
};
$scope.startHighIntensity = function() {
@ -141,7 +129,6 @@
};
$scope.$apply(function() {
$scope.time--;
$scope.timeRemaining = $scope.getTimeRemaining();
});
};
$scope.startTimer = function() {