mirror of
https://github.com/overleaf/overleaf.git
synced 2024-10-31 21:21:03 -04:00
29 lines
834 B
CoffeeScript
29 lines
834 B
CoffeeScript
define [
|
|
"base"
|
|
], (App) ->
|
|
App.controller "PlansController", ($scope, $modal, event_tracking) ->
|
|
|
|
$scope.ui =
|
|
view: "monthly"
|
|
|
|
$scope.signUpNowClicked = (plan, annual)->
|
|
if $scope.ui.view == "annual"
|
|
plan = "#{plan}_annual"
|
|
event_tracking.send 'subscription-funnel', 'sign_up_now_button', plan
|
|
|
|
$scope.switchToMonthly = ->
|
|
$scope.ui.view = "monthly"
|
|
event_tracking.send 'subscription-funnel', 'plans-page', 'monthly-prices'
|
|
|
|
$scope.switchToStudent = ->
|
|
$scope.ui.view = "student"
|
|
event_tracking.send 'subscription-funnel', 'plans-page', 'student-prices'
|
|
|
|
$scope.switchToAnnual = ->
|
|
$scope.ui.view = "annual"
|
|
event_tracking.send 'subscription-funnel', 'plans-page', 'student-prices'
|
|
|
|
$scope.openGroupPlanModal = () ->
|
|
$modal.open {
|
|
templateUrl: "groupPlanModalTemplate"
|
|
}
|