overleaf/services/web/public/coffee/ide/FeatureOnboardingController.coffee
2016-10-26 11:12:34 +01:00

22 lines
569 B
CoffeeScript

define [
"base"
], (App) ->
App.controller "FeatureOnboardingController", ($scope, settings) ->
$scope.isFeatureSettingDefined = window.userSettings.syntaxValidation?;
$scope.innerStep = 1
$scope.turnCodeCheckOn = () ->
settings.saveSettings({ syntaxValidation: true })
navToInnerStep2()
$scope.turnCodeCheckOn = () ->
settings.saveSettings({ syntaxValidation: false })
navToInnerStep2()
$scope.dismiss = () ->
$scope.isFeatureSettingDefined = true
navToInnerStep2 = () ->
$scope.innerStep = 2
$scope.ui.leftMenuShown = true