From b25e69d131e159b726fc8987efcc772de385f904 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Thu, 23 Feb 2017 12:50:12 +0100 Subject: [PATCH] fix do not subscribe --- app/assets/javascripts/controllers/machines.coffee.erb | 3 ++- app/assets/javascripts/controllers/trainings.coffee.erb | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/controllers/machines.coffee.erb b/app/assets/javascripts/controllers/machines.coffee.erb index 13f541f90..bb211a876 100644 --- a/app/assets/javascripts/controllers/machines.coffee.erb +++ b/app/assets/javascripts/controllers/machines.coffee.erb @@ -468,6 +468,7 @@ Application.Controllers.controller "ReserveMachineController", ["$scope", "$stat e.preventDefault() $scope.plansAreShown = false $scope.selectPlan($scope.selectedPlan) + $scope.planSelectionTime = new Date() @@ -484,12 +485,12 @@ Application.Controllers.controller "ReserveMachineController", ["$scope", "$stat # @param plan {Object} the plan to subscribe ## $scope.selectPlan = (plan) -> - $scope.planSelectionTime = new Date() # toggle selected plan if $scope.selectedPlan != plan $scope.selectedPlan = plan else $scope.selectedPlan = null + $scope.planSelectionTime = new Date() diff --git a/app/assets/javascripts/controllers/trainings.coffee.erb b/app/assets/javascripts/controllers/trainings.coffee.erb index ea8732bfb..cfd48f5b2 100644 --- a/app/assets/javascripts/controllers/trainings.coffee.erb +++ b/app/assets/javascripts/controllers/trainings.coffee.erb @@ -278,12 +278,12 @@ Application.Controllers.controller "ReserveTrainingController", ["$scope", "$sta # @param plan {Object} the plan to subscribe ## $scope.selectPlan = (plan) -> - $scope.planSelectionTime = new Date() # toggle selected plan if $scope.selectedPlan != plan $scope.selectedPlan = plan else $scope.selectedPlan = null + $scope.planSelectionTime = new Date() @@ -295,6 +295,7 @@ Application.Controllers.controller "ReserveTrainingController", ["$scope", "$sta e.preventDefault() $scope.plansAreShown = false $scope.selectedPlan = null + $scope.planSelectionTime = new Date()