annotate static/js/wikked.js @ 65:c6dcf6716d26

Fixed slugification bug on Windows.
author Ludovic Chabant <ludovic@chabant.com>
date Fri, 08 Feb 2013 15:20:08 -0800
parents 97efd73f2158
children d5caf4030999
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
c946f4facfa2 Initial commit.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
1 /**
15
238299b93f4c Made all Javascript code use RequireJS.
Ludovic Chabant <ludovic@chabant.com>
parents: 13
diff changeset
2 * RequireJS configuration.
238299b93f4c Made all Javascript code use RequireJS.
Ludovic Chabant <ludovic@chabant.com>
parents: 13
diff changeset
3 *
238299b93f4c Made all Javascript code use RequireJS.
Ludovic Chabant <ludovic@chabant.com>
parents: 13
diff changeset
4 * We need to alias/shim some of the libraries.
0
c946f4facfa2 Initial commit.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
5 */
15
238299b93f4c Made all Javascript code use RequireJS.
Ludovic Chabant <ludovic@chabant.com>
parents: 13
diff changeset
6 require.config({
238299b93f4c Made all Javascript code use RequireJS.
Ludovic Chabant <ludovic@chabant.com>
parents: 13
diff changeset
7 urlArgs: "bust=" + (new Date()).getTime(),
238299b93f4c Made all Javascript code use RequireJS.
Ludovic Chabant <ludovic@chabant.com>
parents: 13
diff changeset
8 paths: {
63
97efd73f2158 Changed RequireJS paths to make it usable with the optimizer.
Ludovic Chabant <ludovic@chabant.com>
parents: 61
diff changeset
9 jquery: 'js/jquery-1.8.3.min',
97efd73f2158 Changed RequireJS paths to make it usable with the optimizer.
Ludovic Chabant <ludovic@chabant.com>
parents: 61
diff changeset
10 underscore: 'js/underscore-min',
97efd73f2158 Changed RequireJS paths to make it usable with the optimizer.
Ludovic Chabant <ludovic@chabant.com>
parents: 61
diff changeset
11 backbone: 'js/backbone-min',
97efd73f2158 Changed RequireJS paths to make it usable with the optimizer.
Ludovic Chabant <ludovic@chabant.com>
parents: 61
diff changeset
12 handlebars: 'js/handlebars-1.0.rc.1',
97efd73f2158 Changed RequireJS paths to make it usable with the optimizer.
Ludovic Chabant <ludovic@chabant.com>
parents: 61
diff changeset
13 bootstrap_modal: '/bootstrap/js/bootstrap-modal',
97efd73f2158 Changed RequireJS paths to make it usable with the optimizer.
Ludovic Chabant <ludovic@chabant.com>
parents: 61
diff changeset
14 text: 'js/text'
15
238299b93f4c Made all Javascript code use RequireJS.
Ludovic Chabant <ludovic@chabant.com>
parents: 13
diff changeset
15 },
238299b93f4c Made all Javascript code use RequireJS.
Ludovic Chabant <ludovic@chabant.com>
parents: 13
diff changeset
16 shim: {
238299b93f4c Made all Javascript code use RequireJS.
Ludovic Chabant <ludovic@chabant.com>
parents: 13
diff changeset
17 'jquery': {
238299b93f4c Made all Javascript code use RequireJS.
Ludovic Chabant <ludovic@chabant.com>
parents: 13
diff changeset
18 exports: '$'
238299b93f4c Made all Javascript code use RequireJS.
Ludovic Chabant <ludovic@chabant.com>
parents: 13
diff changeset
19 },
238299b93f4c Made all Javascript code use RequireJS.
Ludovic Chabant <ludovic@chabant.com>
parents: 13
diff changeset
20 'underscore': {
238299b93f4c Made all Javascript code use RequireJS.
Ludovic Chabant <ludovic@chabant.com>
parents: 13
diff changeset
21 exports: '_'
238299b93f4c Made all Javascript code use RequireJS.
Ludovic Chabant <ludovic@chabant.com>
parents: 13
diff changeset
22 },
238299b93f4c Made all Javascript code use RequireJS.
Ludovic Chabant <ludovic@chabant.com>
parents: 13
diff changeset
23 'backbone': {
238299b93f4c Made all Javascript code use RequireJS.
Ludovic Chabant <ludovic@chabant.com>
parents: 13
diff changeset
24 deps: ['underscore', 'jquery'],
238299b93f4c Made all Javascript code use RequireJS.
Ludovic Chabant <ludovic@chabant.com>
parents: 13
diff changeset
25 exports: 'Backbone'
238299b93f4c Made all Javascript code use RequireJS.
Ludovic Chabant <ludovic@chabant.com>
parents: 13
diff changeset
26 },
238299b93f4c Made all Javascript code use RequireJS.
Ludovic Chabant <ludovic@chabant.com>
parents: 13
diff changeset
27 'handlebars': {
238299b93f4c Made all Javascript code use RequireJS.
Ludovic Chabant <ludovic@chabant.com>
parents: 13
diff changeset
28 exports: 'Handlebars'
21
5639fb1a3693 Added Bootstrap's Javascript to RequireJS bundle.
Ludovic Chabant <ludovic@chabant.com>
parents: 15
diff changeset
29 },
61
130eccd396d8 Now using Boostrap with LESS.
Ludovic Chabant <ludovic@chabant.com>
parents: 60
diff changeset
30 'bootstrap_modal': {
21
5639fb1a3693 Added Bootstrap's Javascript to RequireJS bundle.
Ludovic Chabant <ludovic@chabant.com>
parents: 15
diff changeset
31 deps: ['jquery']
0
c946f4facfa2 Initial commit.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
32 }
c946f4facfa2 Initial commit.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
33 }
11
aa6951805e1a New features and bug fixes:
Ludovic Chabant <ludovic@chabant.com>
parents: 10
diff changeset
34 });
3
59cad6ce1a1c Added support for history and diffing.
Ludovic Chabant <ludovic@chabant.com>
parents: 0
diff changeset
35
59cad6ce1a1c Added support for history and diffing.
Ludovic Chabant <ludovic@chabant.com>
parents: 0
diff changeset
36 //-------------------------------------------------------------//
59cad6ce1a1c Added support for history and diffing.
Ludovic Chabant <ludovic@chabant.com>
parents: 0
diff changeset
37
59cad6ce1a1c Added support for history and diffing.
Ludovic Chabant <ludovic@chabant.com>
parents: 0
diff changeset
38 /**
15
238299b93f4c Made all Javascript code use RequireJS.
Ludovic Chabant <ludovic@chabant.com>
parents: 13
diff changeset
39 * Entry point: run Backbone!
238299b93f4c Made all Javascript code use RequireJS.
Ludovic Chabant <ludovic@chabant.com>
parents: 13
diff changeset
40 *
40
81333391792d Moved client code from HTML template to `views.js`.
Ludovic Chabant <ludovic@chabant.com>
parents: 21
diff changeset
41 * We also import scripts like `handlebars` that are not used directly
81333391792d Moved client code from HTML template to `views.js`.
Ludovic Chabant <ludovic@chabant.com>
parents: 21
diff changeset
42 * by anybody, but need to be evaluated.
0
c946f4facfa2 Initial commit.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
43 */
15
238299b93f4c Made all Javascript code use RequireJS.
Ludovic Chabant <ludovic@chabant.com>
parents: 13
diff changeset
44 require([
63
97efd73f2158 Changed RequireJS paths to make it usable with the optimizer.
Ludovic Chabant <ludovic@chabant.com>
parents: 61
diff changeset
45 'js/wikked/app',
97efd73f2158 Changed RequireJS paths to make it usable with the optimizer.
Ludovic Chabant <ludovic@chabant.com>
parents: 61
diff changeset
46 'js/wikked/handlebars',
21
5639fb1a3693 Added Bootstrap's Javascript to RequireJS bundle.
Ludovic Chabant <ludovic@chabant.com>
parents: 15
diff changeset
47 'backbone',
48
9658edea3121 Now using RequireJS' "text" extension to load all HTML templates.
Ludovic Chabant <ludovic@chabant.com>
parents: 40
diff changeset
48 'text'
15
238299b93f4c Made all Javascript code use RequireJS.
Ludovic Chabant <ludovic@chabant.com>
parents: 13
diff changeset
49 ],
48
9658edea3121 Now using RequireJS' "text" extension to load all HTML templates.
Ludovic Chabant <ludovic@chabant.com>
parents: 40
diff changeset
50 function(app, hb, Backbone, textExtension) {
3
59cad6ce1a1c Added support for history and diffing.
Ludovic Chabant <ludovic@chabant.com>
parents: 0
diff changeset
51
15
238299b93f4c Made all Javascript code use RequireJS.
Ludovic Chabant <ludovic@chabant.com>
parents: 13
diff changeset
52 var router = new app.Router();
238299b93f4c Made all Javascript code use RequireJS.
Ludovic Chabant <ludovic@chabant.com>
parents: 13
diff changeset
53 Backbone.history.start();//{ pushState: true });
0
c946f4facfa2 Initial commit.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
54
c946f4facfa2 Initial commit.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
55 });
c946f4facfa2 Initial commit.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
56