2016-10-20 11:39:43 -04:00
|
|
|
define [
|
|
|
|
"base"
|
|
|
|
], (App) ->
|
2016-10-24 07:20:08 -04:00
|
|
|
App.controller "FeatureOnboardingController", ($scope, settings) ->
|
2017-02-07 10:07:26 -05:00
|
|
|
$scope.onboarding =
|
|
|
|
innerStep: 1
|
2017-02-08 12:19:13 -05:00
|
|
|
nSteps: 4
|
2016-10-20 11:39:43 -04:00
|
|
|
|
2016-10-24 07:20:08 -04:00
|
|
|
$scope.dismiss = () ->
|
2017-02-08 12:19:13 -05:00
|
|
|
$scope.ui.showCollabFeaturesOnboarding = false
|
|
|
|
|
|
|
|
$scope.gotoPrevStep = () ->
|
|
|
|
if $scope.onboarding.innerStep > 1
|
|
|
|
$scope.onboarding.innerStep--;
|
|
|
|
|
|
|
|
$scope.gotoNextStep = () ->
|
|
|
|
if $scope.onboarding.innerStep < 4
|
|
|
|
$scope.onboarding.innerStep++;
|
2016-10-24 07:20:08 -04:00
|
|
|
|
2017-02-07 10:07:26 -05:00
|
|
|
# handleKeypress = (e) ->
|
|
|
|
# if e.keyCode == 13
|
|
|
|
# if $scope.innerStep == 1
|
|
|
|
# $scope.turnCodeCheckOn()
|
|
|
|
# else
|
|
|
|
# $scope.dismiss()
|
2016-11-01 12:17:42 -04:00
|
|
|
|
2017-02-07 10:07:26 -05:00
|
|
|
# $(document).on "keypress", handleKeypress
|
2016-11-01 12:17:42 -04:00
|
|
|
|
2017-02-07 10:07:26 -05:00
|
|
|
# $scope.$on "$destroy", () ->
|
|
|
|
# $(document).off "keypress", handleKeypress
|