mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-15 14:43:46 +01:00
Merge branch 'master' of https://github.com/sharelatex/web-sharelatex
This commit is contained in:
@@ -62,7 +62,8 @@ module.exports = SubscriptionController =
|
|||||||
recurlyConfig: JSON.stringify
|
recurlyConfig: JSON.stringify
|
||||||
currency: currency
|
currency: currency
|
||||||
subdomain: Settings.apis.recurly.subdomain
|
subdomain: Settings.apis.recurly.subdomain
|
||||||
showCouponField:req.query.scf
|
showCouponField: req.query.scf
|
||||||
|
couponCode: req.query.cc or ""
|
||||||
subscriptionFormOptions: JSON.stringify
|
subscriptionFormOptions: JSON.stringify
|
||||||
acceptedCards: ['discover', 'mastercard', 'visa']
|
acceptedCards: ['discover', 'mastercard', 'visa']
|
||||||
target : "#subscribeForm"
|
target : "#subscribeForm"
|
||||||
|
|||||||
@@ -107,6 +107,15 @@ app.get "/status", (req, res)->
|
|||||||
res.send("web sharelatex is alive")
|
res.send("web sharelatex is alive")
|
||||||
req.session.destroy()
|
req.session.destroy()
|
||||||
|
|
||||||
|
profiler = require "v8-profiler"
|
||||||
|
app.get "/profile", (req, res) ->
|
||||||
|
time = parseInt(req.query.time || "1000")
|
||||||
|
profiler.startProfiling("test")
|
||||||
|
setTimeout () ->
|
||||||
|
profile = profiler.stopProfiling("test")
|
||||||
|
res.json(profile)
|
||||||
|
, time
|
||||||
|
|
||||||
logger.info ("creating HTTP server").yellow
|
logger.info ("creating HTTP server").yellow
|
||||||
server = require('http').createServer(app)
|
server = require('http').createServer(app)
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ block scripts
|
|||||||
window.countryCode = '#{countryCode}'
|
window.countryCode = '#{countryCode}'
|
||||||
window.plan_code = '#{plan_code}'
|
window.plan_code = '#{plan_code}'
|
||||||
window.recurlyApiKey = "!{settings.apis.recurly.publicKey}"
|
window.recurlyApiKey = "!{settings.apis.recurly.publicKey}"
|
||||||
|
window.couponCode = "#{couponCode}"
|
||||||
|
|
||||||
block content
|
block content
|
||||||
- locals.supressDefaultJs = true
|
- locals.supressDefaultJs = true
|
||||||
@@ -148,11 +148,10 @@ block content
|
|||||||
mixin countries_options()
|
mixin countries_options()
|
||||||
.row
|
.row
|
||||||
.col-md-8
|
.col-md-8
|
||||||
if showCouponField == 'true'
|
if (showCouponField)
|
||||||
.form-group
|
.form-group
|
||||||
input.form-control(type='text', ng-blur="applyCoupon()", ng-model="data.coupon", placeholder="#{translate('coupon')}")
|
input.form-control(type='text', ng-blur="applyCoupon()", ng-model="data.coupon", placeholder="#{translate('coupon')}")
|
||||||
|
|
||||||
|
|
||||||
.row
|
.row
|
||||||
.col-xs-7
|
.col-xs-7
|
||||||
.form-group
|
.form-group
|
||||||
|
|||||||
@@ -41,6 +41,7 @@
|
|||||||
"translations-sharelatex": "git+https://github.com/sharelatex/translations-sharelatex.git#master",
|
"translations-sharelatex": "git+https://github.com/sharelatex/translations-sharelatex.git#master",
|
||||||
"underscore": "1.6.0",
|
"underscore": "1.6.0",
|
||||||
"underscore.string": "^3.0.2",
|
"underscore.string": "^3.0.2",
|
||||||
|
"v8-profiler": "^5.2.3",
|
||||||
"xml2js": "0.2.0"
|
"xml2js": "0.2.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ define [
|
|||||||
state:""
|
state:""
|
||||||
city:""
|
city:""
|
||||||
country:window.countryCode
|
country:window.countryCode
|
||||||
|
coupon: window.couponCode
|
||||||
|
|
||||||
|
|
||||||
$scope.validation =
|
$scope.validation =
|
||||||
@@ -41,7 +42,13 @@ define [
|
|||||||
pricing = recurly.Pricing()
|
pricing = recurly.Pricing()
|
||||||
window.pricing = pricing
|
window.pricing = pricing
|
||||||
|
|
||||||
pricing.plan(window.plan_code, { quantity: 1 }).address({country: $scope.data.country}).tax({tax_code: 'digital', vat_number: ''}).currency($scope.currencyCode).done()
|
initialPricing = pricing
|
||||||
|
.plan(window.plan_code, { quantity: 1 })
|
||||||
|
.address({country: $scope.data.country})
|
||||||
|
.tax({tax_code: 'digital', vat_number: ''})
|
||||||
|
.currency($scope.currencyCode)
|
||||||
|
.coupon($scope.data.coupon)
|
||||||
|
.done()
|
||||||
|
|
||||||
pricing.on "change", =>
|
pricing.on "change", =>
|
||||||
$scope.planName = pricing.items.plan.name
|
$scope.planName = pricing.items.plan.name
|
||||||
|
|||||||
Reference in New Issue
Block a user