diff --git a/www/js/controllers.js b/www/js/controllers.js index 1ef35f9..e62a6e3 100644 --- a/www/js/controllers.js +++ b/www/js/controllers.js @@ -529,6 +529,8 @@ angular.module('confjuvapp.controllers', []) $scope.showBackupProposalsLink = true; } } + + $scope.changingCard = false; }; $scope.showBackupProposals = function() { @@ -537,12 +539,16 @@ angular.module('confjuvapp.controllers', []) $scope.showBackupProposalsLink = false; }; + $scope.changingCard = false; $scope.nextCard = function() { - var index = $scope.cards.length - 1; - if (index == -1) { - index = 0; + if (!$scope.changingCard) { + $scope.changingCard = true; + var index = $scope.cards.length - 1; + if (index == -1) { + index = 0; + } + $scope.cardDestroyed(index); } - $scope.cardDestroyed(index); }; /****************************************************************************** -- libgit2 0.21.2