Merge branch 'master' of github.com:sharelatex/web-sharelatex

This commit is contained in:
James Allen 2015-12-11 11:30:20 +00:00
commit c40b882ee2
3 changed files with 17 additions and 11 deletions

View file

@ -57,7 +57,7 @@
],
shouldSendCallback: function(data) {
// only send a fraction of errors
var sampleRate = 0.05;
var sampleRate = 0.01;
return (Math.random() <= sampleRate);
},
dataCallback: function(data) {

View file

@ -111,7 +111,7 @@ block content
span(ng-if="sixpackOpt == 'downgrade-options'")
div(ng-show="isMonthlyCollab && stillInFreeTrial", style="text-align: center")
div(ng-show="showExtendFreeTrial", style="text-align: center")
p !{translate("have_more_days_to_try", {days:14})}
button(type="submit", ng-click="exendTrial()", ng-disabled='inflight').btn.btn-success #{translate("ill_take_it")}
p
@ -120,7 +120,7 @@ block content
a(href, ng-click="cancelSubscription()", ng-disabled='inflight') #{translate("no_thanks_cancel_now")}
div(ng-show="isMonthlyCollab && !stillInFreeTrial", style="text-align: center")
div(ng-show="showDowngradeToStudent", style="text-align: center")
span(ng-controller="ChangePlanFormController")
p
!{translate("interested_in_cheaper_plan",{price:'{{studentPrice}}'})}
@ -130,18 +130,17 @@ block content
p
a(href, ng-click="cancelSubscription()", ng-disabled='inflight') #{translate("no_thanks_cancel_now")}
div(ng-show="!isMonthlyCollab && !stillInFreeTrial")
div(ng-show="showBasicCancel")
p #{translate("sure_you_want_to_cancel")}
a(href="/project").btn.btn-info #{translate("i_want_to_stay")}
| &nbsp;
a(ng-click="cancelSubscription()", ng-disabled='inflight').btn.btn-primary #{translate("cancel_my_account")}
span(ng-if="sixpackOpt == 'basic'")
div(ng-show="!isMonthlyCollab && !stillInFreeTrial")
p #{translate("sure_you_want_to_cancel")}
a(href="/project").btn.btn-info #{translate("i_want_to_stay")}
| &nbsp;
a(ng-click="cancelSubscription()", ng-disabled='inflight').btn.btn-primary #{translate("cancel_my_account")}
p #{translate("sure_you_want_to_cancel")}
a(href="/project").btn.btn-info #{translate("i_want_to_stay")}
| &nbsp;
a(ng-click="cancelSubscription()", ng-disabled='inflight').btn.btn-primary #{translate("cancel_my_account")}
script(type="text/javascript").
$('#cancelSubscription').on("click", function() {

View file

@ -85,8 +85,15 @@ define [
freeTrialExpiresUnderSevenDays = freeTrialEndDate < sevenDaysTime
$scope.view = 'overview'
$scope.isMonthlyCollab = subscription?.planCode?.indexOf("collaborator") != -1 and subscription?.planCode?.indexOf("ann") == -1
$scope.stillInFreeTrial = freeTrialInFuture and freeTrialExpiresUnderSevenDays
isMonthlyCollab = subscription?.planCode?.indexOf("collaborator") != -1 and subscription?.planCode?.indexOf("ann") == -1
stillInFreeTrial = freeTrialInFuture and freeTrialExpiresUnderSevenDays
if isMonthlyCollab and stillInFreeTrial
$scope.showExtendFreeTrial = true
else if isMonthlyCollab and !stillInFreeTrial
$scope.showDowngradeToStudent = true
else
$scope.showBasicCancel = true
setupReturly()