Skip to content

Commit

Permalink
changes
Browse files Browse the repository at this point in the history
  • Loading branch information
arneson committed Nov 23, 2014
2 parents 67e7c3d + 7362e88 commit 00f30c4
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions app/controllers/controllers.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,16 +180,22 @@ app.controller('januController', ['$scope','$http','$interval', function ($scope
else if (ans === 0) {
if ($scope.currentYear <= $scope.timelineSongs[0].year)
answerSuccess();
else{
$scope.comboplyer = 1;
$("#album-cover").addClass('wrong');
}
} else if (ans === -1) {
if ($scope.currentYear >= _.last($scope.timelineSongs).year)
answerSuccess();
else{
$scope.comboplyer = 1;
$("#album-cover").addClass('wrong');
}
} else {
if ($scope.currentYear >= $scope.timelineSongs[ans-1].year &&
$scope.currentYear <= $scope.timelineSongs[ans].year){
if ($scope.currentYear >= $scope.timelineSongs[ans-1].year && $scope.currentYear <= $scope.timelineSongs[ans].year){
answerSuccess();
}
else{
$scope.comboplyer = 1;
}else{
$scope.comboplyer = 1;
$("#album-cover").addClass('wrong');
}

Expand All @@ -201,11 +207,11 @@ app.controller('januController', ['$scope','$http','$interval', function ($scope
// new song
$scope.roundActive = false;
$("#song-details").fadeIn(500);
setTimeout(function () {
$("#song-details").fadeOut(500);
setTimeout(function () {
$('#album-cover').removeClass('no-blur');
$('#album-cover').removeClass('correct');
$('#album-cover').removeClass('wrong');
$("#song-details").hide();
newSong = fetchNewSong();
playSong(newSong);
$scope.markerSet = false;
Expand Down

0 comments on commit 00f30c4

Please sign in to comment.