comparison static/js/wikked/views.js @ 63:97efd73f2158

Changed RequireJS paths to make it usable with the optimizer.
author Ludovic Chabant <ludovic@chabant.com>
date Wed, 06 Feb 2013 23:48:34 -0800
parents a73a3c0b6d4a
children 0adac3bc079e
comparison
equal deleted inserted replaced
62:a73a3c0b6d4a 63:97efd73f2158
4 define([ 4 define([
5 'jquery', 5 'jquery',
6 'underscore', 6 'underscore',
7 'backbone', 7 'backbone',
8 'handlebars', 8 'handlebars',
9 './client', 9 'js/wikked/client',
10 './models', 10 'js/wikked/models',
11 './util', 11 'js/wikked/util',
12 'text!/tpl/read-page.html', 12 'text!tpl/read-page.html',
13 'text!/tpl/edit-page.html', 13 'text!tpl/edit-page.html',
14 'text!/tpl/history-page.html', 14 'text!tpl/history-page.html',
15 'text!/tpl/revision-page.html', 15 'text!tpl/revision-page.html',
16 'text!/tpl/diff-page.html', 16 'text!tpl/diff-page.html',
17 'text!/tpl/inlinks-page.html', 17 'text!tpl/inlinks-page.html',
18 'text!/tpl/nav.html', 18 'text!tpl/nav.html',
19 'text!/tpl/footer.html', 19 'text!tpl/footer.html',
20 'text!/tpl/search-results.html', 20 'text!tpl/search-results.html',
21 'text!/tpl/login.html', 21 'text!tpl/login.html',
22 'text!/tpl/error-unauthorized.html', 22 'text!tpl/error-unauthorized.html',
23 'text!/tpl/error-not-found.html', 23 'text!tpl/error-not-found.html',
24 'text!/tpl/error-unauthorized-edit.html', 24 'text!tpl/error-unauthorized-edit.html',
25 'text!/tpl/state-warning.html', 25 'text!tpl/state-warning.html',
26 'text!/tpl/special-nav.html', 26 'text!tpl/special-nav.html',
27 'text!/tpl/special-pages.html', 27 'text!tpl/special-pages.html',
28 'text!/tpl/special-changes.html', 28 'text!tpl/special-changes.html',
29 'text!/tpl/special-orphans.html' 29 'text!tpl/special-orphans.html'
30 ], 30 ],
31 function($, _, Backbone, Handlebars, Client, Models, Util, 31 function($, _, Backbone, Handlebars, Client, Models, Util,
32 tplReadPage, tplEditPage, tplHistoryPage, tplRevisionPage, tplDiffPage, tplInLinksPage, 32 tplReadPage, tplEditPage, tplHistoryPage, tplRevisionPage, tplDiffPage, tplInLinksPage,
33 tplNav, tplFooter, tplSearchResults, tplLogin, 33 tplNav, tplFooter, tplSearchResults, tplLogin,
34 tplErrorNotAuthorized, tplErrorNotFound, tplErrorUnauthorizedEdit, tplStateWarning, 34 tplErrorNotAuthorized, tplErrorNotFound, tplErrorUnauthorizedEdit, tplStateWarning,
287 // Input area resizing with the grip. 287 // Input area resizing with the grip.
288 var last_pageY; 288 var last_pageY;
289 last_pageY = e.pageY; 289 last_pageY = e.pageY;
290 $('body') 290 $('body')
291 .on('mousemove.wikked.editor_resize', function(e) { 291 .on('mousemove.wikked.editor_resize', function(e) {
292 var editor_control = $('textarea#wmd-input');
292 editor_control.height(editor_control.height() + e.pageY - last_pageY); 293 editor_control.height(editor_control.height() + e.pageY - last_pageY);
293 last_pageY = e.pageY; 294 last_pageY = e.pageY;
294 }) 295 })
295 .on('mouseup.wikked.editor_resize mouseleave.wikked.editor_resize', function(e) { 296 .on('mouseup.wikked.editor_resize mouseleave.wikked.editor_resize', function(e) {
296 $('body').off('.wikked.editor_resize'); 297 $('body').off('.wikked.editor_resize');