Merge branch 'tahmidshahriar-master'

This commit is contained in:
Nick Winter 2015-06-29 11:01:38 -07:00
commit 3074737398
3 changed files with 7 additions and 23 deletions

View file

@ -1,8 +1,6 @@
gplusClientID = '800329290710-j9sivplv2gpcdgkrsis9rff3o417mlfa.apps.googleusercontent.com'
# TODO: Move to GPlusHandler
NotFoundView = require('views/core/NotFoundView')
go = (path) -> -> @routeDirectly path, arguments
module.exports = class CocoRouter extends Backbone.Router
@ -118,7 +116,7 @@ module.exports = class CocoRouter extends Backbone.Router
#'user/:slugOrID/profile': go('user/JobProfileView')
'user/:slugOrID/profile': go('EmployersView') # Show the not-recruiting-now screen
'*name': 'showNotFoundView'
'*name': go('NotFoundView')
routeToServer: (e) ->
window.location.href = window.location.href
@ -142,13 +140,6 @@ module.exports = class CocoRouter extends Backbone.Router
if error.toString().search('Cannot find module "' + path + '" from') is -1
throw error
showNotFoundView: ->
@openView @notFoundView()
notFoundView: ->
view = new NotFoundView()
view.render()
openView: (view) ->
@closeCurrentView()
$('#page-container').empty().append view.el

View file

@ -0,0 +1,6 @@
RootView = require 'views/core/RootView'
template = require 'templates/core/not-found'
module.exports = class NotFoundView extends RootView
id: 'not-found-view'
template: template

View file

@ -1,13 +0,0 @@
RootView = require 'views/core/RootView'
template = require 'templates/core/not-found'
module.exports = class NotFoundView extends RootView
id: 'not-found-view'
template: template
# For some reason, it wasn't really rendering the top bar or doing i18n, so I hacked around it. (#2068.)
afterRender: ->
unless @renderedOnce
_.delay (=> @render?()), 1000
@renderedOnce = true
super()