Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $scope.startOrStop = function() {
- if (isStart) {
- $scope.style = {background: 'red'};
- $scope.start();
- $scope.startTIME();
- isStart = false;
- $scope.buttonText = "Stop";
- } else {
- $scope.style = {
- background: '#11dc51'
- };
- $scope.stop();
- isStart = true;
- $scope.buttonText = "Start";
- }
- };
- $scope.quickStart=function(tasks){
- if (isStart) {
- $scope.style = {
- background: 'red'
- };
- $scope.start();
- $scope.startTIME();
- isStart = false;
- $scope.buttonText = "Stop";
- $scope.currentTask.name=tasks.name;
- $scope.currentTask.selectedProject=tasks.selectedProject;
- } else {
- $scope.style = {
- background: 'red'
- };
- $scope.stop();
- var restart = $timeout($scope.quickStart, 100);
- $scope.currentTask.name=tasks.name;
- $scope.currentTask.selectedProject=tasks.selectedProject;
- isStart = true;
- $scope.buttonText = "Stop";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement