Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F120502700
entry.coffee
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Fri, Jul 4, 20:40
Size
1 KB
Mime Type
text/x-c++
Expires
Sun, Jul 6, 20:40 (2 d)
Engine
blob
Format
Raw Data
Handle
27174618
Attached To
R7177 epiph
entry.coffee
View Options
AccountsEntry =
settings:
wrapLinks: true
homeRoute: '/'
dashboardRoute: '/dashboard'
passwordSignupFields: 'EMAIL_ONLY'
emailToLower: true
usernameToLower: false
entrySignUp: '/sign-up'
extraSignUpFields: []
showOtherLoginServices: true
fluidLayout: false
useContainer: true
signInAfterRegistration: true
emailVerificationPendingRoute: '/verification-pending'
showSpinner: true
spinnerOptions: { color: "#000", top: "80%" }
isStringEmail: (email) ->
emailPattern = /^([\w.-]+)@([\w.-]+)\.([a-zA-Z.]{2,6})$/i
if email.match emailPattern then true else false
config: (appConfig) ->
@settings = _.extend(@settings, appConfig)
T9n.defaultLanguage = "en"
if appConfig.language
T9n.language = appConfig.language
if appConfig.signUpTemplate
signUpRoute = Router.routes['entrySignUp']
signUpRoute.options.template = appConfig.signUpTemplate
signInRequired: (router, extraCondition) ->
extraCondition ?= true
unless Meteor.loggingIn()
if Meteor.user() and extraCondition
router.next()
else
Session.set('fromWhere', router.url)
Router.go('/sign-in')
Session.set('entryError', t9n('error.signInRequired'))
router.next()
@AccountsEntry = AccountsEntry
class @T9NHelper
@translate: (code) ->
T9n.get code, "error.accounts"
@accountsError: (err) ->
Session.set 'entryError', @translate err.reason
Event Timeline
Log In to Comment