From 32d59b621256965b2e1e7a5f8d54ed50867e1ded Mon Sep 17 00:00:00 2001 From: Paulo Reis Date: Mon, 24 Oct 2016 12:20:08 +0100 Subject: [PATCH] Add setting saving logic. --- .../public/coffee/ide/FeatureOnboardingController.coffee | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/services/web/public/coffee/ide/FeatureOnboardingController.coffee b/services/web/public/coffee/ide/FeatureOnboardingController.coffee index fbf9c5250e..2e9faedbae 100644 --- a/services/web/public/coffee/ide/FeatureOnboardingController.coffee +++ b/services/web/public/coffee/ide/FeatureOnboardingController.coffee @@ -1,17 +1,23 @@ define [ "base" ], (App) -> - App.controller "FeatureOnboardingController", ($scope, $modal, event_tracking) -> + App.controller "FeatureOnboardingController", ($scope, settings) -> $scope.isFeatureSettingDefined = window.userSettings.syntaxValidation?; $scope.innerStep = 1 $scope.turnCodeCheckOn = () -> + settings.saveProjectSettings({ syntaxValidation: true }) navToInnerStep2() $scope.turnCodeCheckOn = () -> + settings.saveProjectSettings({ syntaxValidation: false }) navToInnerStep2() + $scope.dismiss = () -> + # TODO Toggle logic. + $scope.isFeatureSettingDefined = false + navToInnerStep2 = () -> $scope.innerStep = 2 $scope.ui.leftMenuShown = true