|
@@ -27,6 +27,7 @@ define [
|
|
|
"directives/rightClick"
|
|
"directives/rightClick"
|
|
|
"filters/formatDate"
|
|
"filters/formatDate"
|
|
|
"main/event-tracking"
|
|
"main/event-tracking"
|
|
|
|
|
+ "main/account-upgrade"
|
|
|
], (
|
|
], (
|
|
|
App
|
|
App
|
|
|
FileTreeManager
|
|
FileTreeManager
|
|
@@ -38,7 +39,8 @@ define [
|
|
|
PdfManager
|
|
PdfManager
|
|
|
BinaryFilesManager
|
|
BinaryFilesManager
|
|
|
) ->
|
|
) ->
|
|
|
- App.controller "IdeController", ($scope, $timeout, ide, abTestManager) ->
|
|
|
|
|
|
|
+
|
|
|
|
|
+ App.controller "IdeController", ($scope, $timeout, ide) ->
|
|
|
# Don't freak out if we're already in an apply callback
|
|
# Don't freak out if we're already in an apply callback
|
|
|
$scope.$originalApply = $scope.$apply
|
|
$scope.$originalApply = $scope.$apply
|
|
|
$scope.$apply = (fn = () ->) ->
|
|
$scope.$apply = (fn = () ->) ->
|
|
@@ -64,17 +66,6 @@ define [
|
|
|
|
|
|
|
|
$scope.chat = {}
|
|
$scope.chat = {}
|
|
|
|
|
|
|
|
- $scope.startFreeTrial = (source) ->
|
|
|
|
|
-
|
|
|
|
|
- testBuckets = [
|
|
|
|
|
- { bucketName:"student_control", planName:"student"}
|
|
|
|
|
- { bucketName:"collab_test", planName:"collaborator"}
|
|
|
|
|
- ]
|
|
|
|
|
- editorPlanBucket = abTestManager.getABTestBucket "editor_plan", testBuckets
|
|
|
|
|
- abTestManager.processTestWithStep("editor_plan", editorPlanBucket.bucketName, 0)
|
|
|
|
|
- ga?('send', 'event', 'subscription-funnel', 'upgraded-free-trial', source)
|
|
|
|
|
- window.open("/user/subscription/new?planCode=#{editorPlanBucket.planName}_free_trial_7_days&ssp=#{editorPlanBucket.planName == 'collaborator'}")
|
|
|
|
|
- $scope.startedFreeTrial = true
|
|
|
|
|
|
|
|
|
|
window._ide = ide
|
|
window._ide = ide
|
|
|
|
|
|