Add QE tab to plans page

Note: This does *not* implement the call to Tectonic yet.
This commit is contained in:
Joseph Schorr 2015-10-26 14:27:16 -04:00
parent d9d8f95726
commit 3a36e23142
5 changed files with 477 additions and 44 deletions

View file

@ -13,11 +13,22 @@
// Monitor any user changes and place the current user into the scope.
UserService.updateUserIn($scope);
$('.plan-tabs a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
$scope.$apply(function() {
$location.search({'tab': e.target.getAttribute('data-target').substr(1)});
});
});
$scope.signedIn = function() {
$('#signinModal').modal('hide');
PlanService.handleNotedPlan();
};
$scope.qeStartTrial = function(plan) {
// TODO(jschorr): Implement.
alert('Not yet implemented!')
};
$scope.buyNow = function(plan) {
PlanService.notePlan(plan);
if ($scope.user && !$scope.user.anonymous) {
@ -42,6 +53,10 @@
if ($scope && $routeParams['trial-plan']) {
$scope.buyNow($routeParams['trial-plan']);
}
if ($scope && $routeParams['tab'] == 'enterprise') {
$('#enterpriseTab').tab('show')
}
}, /* include the personal plan */ true);
}
})();