Merged master

This commit is contained in:
Ruben Vereecken 2014-07-06 20:07:47 +02:00
commit 51bc8e5a7c
3 changed files with 8 additions and 12 deletions

View file

@ -44,7 +44,7 @@ module.exports = class CocoRouter extends Backbone.Router
return @openRoute(args.join('/'))
view = new ViewClass({}, slugOrId)
view.render()
if view then @openView(view) else @showNotFound()
@openView if view then view else @notFoundView()
cache: {}
openRoute: (route) ->
@ -99,7 +99,7 @@ module.exports = class CocoRouter extends Backbone.Router
return document.location.reload()
path = "views/#{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.render()
@openView(view)
@ -117,7 +117,7 @@ module.exports = class CocoRouter extends Backbone.Router
break if ViewClass
split -= 1
return @showNotFound() if not ViewClass
return @notFoundView() if not ViewClass
args = pieces[split+1..]
view = new ViewClass({}, args...) # options, then any path fragment args
view.render()
@ -129,7 +129,7 @@ module.exports = class CocoRouter extends Backbone.Router
if error.toString().search('Cannot find module "' + path + '" from') is -1
throw error
showNotFound: ->
notFoundView: ->
NotFoundView = require('views/not_found')
view = new NotFoundView()
view.render()

View file

@ -118,17 +118,13 @@ UserSchema = c.object {},
type: 'string'
location:
title: 'Location'
description: "The CURRENT location of the candidate"
description: 'The CURRENT location of the candidate'
type: 'string'
education:
title: 'Education'
description: 'The main educational institution of the candidate'
type: 'string'
workHistory: c.array
title: 'Work history'
description: 'One or two places the candidate has worked'
type: 'array'
,
workHistory: c.array {title: 'Work history', description: 'One or two places the candidate has worked', type: 'array'},
title: 'Workplace'
type: 'string'
phoneScreenFilter:

View file

@ -10,7 +10,7 @@ log = require 'winston'
# on the condition that it's necessary and still not too frequent in occurrence
AchievablePlugin = (schema, options) ->
User = require '../users/User' # Avoid mutual inclusion cycles
Achievement = require('../achievements/Achievement')
Achievement = require '../achievements/Achievement'
before = {}