 
     this.setFromSelection = (selection) ->
         if selection.tea
-            for tea in window.teas
+            for tea in $scope.teas
                 if tea.name == selection.tea
                     $scope.tea = tea
                     $scope.tea.checked = true
 
         if selection.degree
-            for degree in window.degrees
+            for degree in $scope.degrees
                 if degree.name == selection.degree
                     $scope.chosenDegree = degree
 

    $scope.onTimerStart = () ->
        console.log("Starting timer for: " + $scope.time)

        teaSelection.storeSelection(selection = {
            tea: $scope.tea.name
            degree: $scope.chosenDegree
            timer: $scope.time
        })
        $scope.displayName = $scope.tea.title
        $scope.actualTime = $scope.time
        $scope.timer = true

                    localize.getLocalizedString('_NotificationMessage_'))

ControlPanelController.$inject = ['$scope', '$timeout', 'teaSelection', 'localize']

@InfoPanelController = ($scope, teaSelection) ->
    self = this
