~openteachermaintainers/openteacher/3.x

« back to all changes in this revision

Viewing changes to node_modules/ot-web/src/404.js

  • Committer: Marten de Vries
  • Date: 2017-06-28 18:05:48 UTC
  • Revision ID: git-v1:b4c406307aa345c58b9904b76580f15c5bff2a4e
Move JS into npm modules

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
var util = require('./util');
 
2
 
 
3
var crossroads = require('crossroads');
 
4
var hasher = require('hasher');
 
5
var session = require('./main').session;
 
6
 
 
7
session.languageChanged.handle(function () {
 
8
        $("#notfound-page .subheader").text(_("Page not found"));
 
9
        $("#notfound-explanation").text(_("The page you requested doesn't exist. You could try going back to the start page."));
 
10
        $("#back-to-start").text(_("Back to the start page"));
 
11
});
 
12
 
 
13
$(function () {
 
14
        $("#back-to-start").click(function () {
 
15
                hasher.setHash("login");
 
16
        });
 
17
});
 
18
 
 
19
crossroads.bypassed.add(function () {
 
20
        util.show("#notfound-page");
 
21
});