overleaf/services/web/public/coffee/ide/FeatureOnboardingController.coffee

24 lines
608 B
CoffeeScript
Raw Normal View History

2016-10-20 11:39:43 -04:00
define [
"base"
], (App) ->
2016-10-24 07:20:08 -04:00
App.controller "FeatureOnboardingController", ($scope, settings) ->
$scope.isFeatureSettingDefined = window.userSettings.syntaxValidation?;
$scope.innerStep = 1
2016-10-20 11:39:43 -04:00
$scope.turnCodeCheckOn = () ->
2016-10-24 07:20:08 -04:00
settings.saveProjectSettings({ syntaxValidation: true })
navToInnerStep2()
2016-10-20 11:39:43 -04:00
$scope.turnCodeCheckOn = () ->
2016-10-24 07:20:08 -04:00
settings.saveProjectSettings({ syntaxValidation: false })
navToInnerStep2()
2016-10-20 11:39:43 -04:00
2016-10-24 07:20:08 -04:00
$scope.dismiss = () ->
# TODO Toggle logic.
$scope.isFeatureSettingDefined = false
navToInnerStep2 = () ->
$scope.innerStep = 2
2016-10-20 11:39:43 -04:00
$scope.ui.leftMenuShown = true