mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-02-17 08:50:58 -05:00
Merged master
This commit is contained in:
commit
51bc8e5a7c
3 changed files with 8 additions and 12 deletions
|
@ -44,7 +44,7 @@ module.exports = class CocoRouter extends Backbone.Router
|
||||||
return @openRoute(args.join('/'))
|
return @openRoute(args.join('/'))
|
||||||
view = new ViewClass({}, slugOrId)
|
view = new ViewClass({}, slugOrId)
|
||||||
view.render()
|
view.render()
|
||||||
if view then @openView(view) else @showNotFound()
|
@openView if view then view else @notFoundView()
|
||||||
|
|
||||||
cache: {}
|
cache: {}
|
||||||
openRoute: (route) ->
|
openRoute: (route) ->
|
||||||
|
@ -99,7 +99,7 @@ module.exports = class CocoRouter extends Backbone.Router
|
||||||
return document.location.reload()
|
return document.location.reload()
|
||||||
path = "views/#{path}"
|
path = "views/#{path}"
|
||||||
ViewClass = @tryToLoadModule path
|
ViewClass = @tryToLoadModule path
|
||||||
return @showNotFound() if not ViewClass
|
return @openView @notFoundView() if not ViewClass
|
||||||
view = new ViewClass({}, args...) # options, then any path fragment args
|
view = new ViewClass({}, args...) # options, then any path fragment args
|
||||||
view.render()
|
view.render()
|
||||||
@openView(view)
|
@openView(view)
|
||||||
|
@ -117,7 +117,7 @@ module.exports = class CocoRouter extends Backbone.Router
|
||||||
break if ViewClass
|
break if ViewClass
|
||||||
split -= 1
|
split -= 1
|
||||||
|
|
||||||
return @showNotFound() if not ViewClass
|
return @notFoundView() if not ViewClass
|
||||||
args = pieces[split+1..]
|
args = pieces[split+1..]
|
||||||
view = new ViewClass({}, args...) # options, then any path fragment args
|
view = new ViewClass({}, args...) # options, then any path fragment args
|
||||||
view.render()
|
view.render()
|
||||||
|
@ -129,7 +129,7 @@ module.exports = class CocoRouter extends Backbone.Router
|
||||||
if error.toString().search('Cannot find module "' + path + '" from') is -1
|
if error.toString().search('Cannot find module "' + path + '" from') is -1
|
||||||
throw error
|
throw error
|
||||||
|
|
||||||
showNotFound: ->
|
notFoundView: ->
|
||||||
NotFoundView = require('views/not_found')
|
NotFoundView = require('views/not_found')
|
||||||
view = new NotFoundView()
|
view = new NotFoundView()
|
||||||
view.render()
|
view.render()
|
||||||
|
|
|
@ -107,7 +107,7 @@ UserSchema = c.object {},
|
||||||
name: {type: 'string', maxLength: 30, title: 'Link Name', description: 'What are you linking to? Ex: "Personal Website", "GitHub"', format: 'link-name'}
|
name: {type: 'string', maxLength: 30, title: 'Link Name', description: 'What are you linking to? Ex: "Personal Website", "GitHub"', format: 'link-name'}
|
||||||
link: c.url {title: 'Link', description: 'The URL.', default: 'http://example.com'}
|
link: c.url {title: 'Link', description: 'The URL.', default: 'http://example.com'}
|
||||||
photoURL: {type: 'string', format: 'image-file', title: 'Profile Picture', description: 'Upload a 256x256px or larger image if you want to show a different profile picture to employers than your normal avatar.'}
|
photoURL: {type: 'string', format: 'image-file', title: 'Profile Picture', description: 'Upload a 256x256px or larger image if you want to show a different profile picture to employers than your normal avatar.'}
|
||||||
curated: c.object {title: 'Curated', required: ['shortDescription','mainTag','location','education','workHistory','phoneScreenFilter','schoolFilter','locationFilter','roleFilter','seniorityFilter']},
|
curated: c.object {title: 'Curated', required: ['shortDescription', 'mainTag', 'location', 'education', 'workHistory', 'phoneScreenFilter', 'schoolFilter', 'locationFilter', 'roleFilter', 'seniorityFilter']},
|
||||||
shortDescription:
|
shortDescription:
|
||||||
title: 'Short description'
|
title: 'Short description'
|
||||||
description: 'A sentence or two describing the candidate'
|
description: 'A sentence or two describing the candidate'
|
||||||
|
@ -118,17 +118,13 @@ UserSchema = c.object {},
|
||||||
type: 'string'
|
type: 'string'
|
||||||
location:
|
location:
|
||||||
title: 'Location'
|
title: 'Location'
|
||||||
description: "The CURRENT location of the candidate"
|
description: 'The CURRENT location of the candidate'
|
||||||
type: 'string'
|
type: 'string'
|
||||||
education:
|
education:
|
||||||
title: 'Education'
|
title: 'Education'
|
||||||
description: 'The main educational institution of the candidate'
|
description: 'The main educational institution of the candidate'
|
||||||
type: 'string'
|
type: 'string'
|
||||||
workHistory: c.array
|
workHistory: c.array {title: 'Work history', description: 'One or two places the candidate has worked', type: 'array'},
|
||||||
title: 'Work history'
|
|
||||||
description: 'One or two places the candidate has worked'
|
|
||||||
type: 'array'
|
|
||||||
,
|
|
||||||
title: 'Workplace'
|
title: 'Workplace'
|
||||||
type: 'string'
|
type: 'string'
|
||||||
phoneScreenFilter:
|
phoneScreenFilter:
|
||||||
|
|
|
@ -10,7 +10,7 @@ log = require 'winston'
|
||||||
# on the condition that it's necessary and still not too frequent in occurrence
|
# on the condition that it's necessary and still not too frequent in occurrence
|
||||||
AchievablePlugin = (schema, options) ->
|
AchievablePlugin = (schema, options) ->
|
||||||
User = require '../users/User' # Avoid mutual inclusion cycles
|
User = require '../users/User' # Avoid mutual inclusion cycles
|
||||||
Achievement = require('../achievements/Achievement')
|
Achievement = require '../achievements/Achievement'
|
||||||
|
|
||||||
before = {}
|
before = {}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue