summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChad Weider <cweider@oofn.net>2012-03-06 17:27:03 -0800
committerChad Weider <cweider@oofn.net>2012-03-10 12:09:27 -0800
commit6af869caddac5046db48484de4b5ae836d05709d (patch)
treefc34cce2aaf80890fe1aca408d8d13a50fa9b04e
parent6fd73ecfda27fd6639c30a4c05c6149d66f669ee (diff)
downloadetherpad-lite-6af869caddac5046db48484de4b5ae836d05709d.zip
Modules requires use relative paths.
-rw-r--r--static/js/Changeset.js2
-rw-r--r--static/js/ace.js2
-rw-r--r--static/js/ace2_common.js2
-rw-r--r--static/js/ace2_inner.js25
-rw-r--r--static/js/broadcast.js12
-rw-r--r--static/js/changesettracker.js4
-rw-r--r--static/js/chat.js4
-rw-r--r--static/js/collab_client.js2
-rw-r--r--static/js/contentcollector.js4
-rw-r--r--static/js/domline.js6
-rw-r--r--static/js/linestylefilter.js6
-rw-r--r--static/js/pad.js46
-rw-r--r--static/js/pad_connectionstatus.js2
-rw-r--r--static/js/pad_docbar.js4
-rw-r--r--static/js/pad_editbar.js6
-rw-r--r--static/js/pad_editor.js6
-rw-r--r--static/js/pad_impexp.js2
-rw-r--r--static/js/pad_modals.js4
-rw-r--r--static/js/pad_savedrevs.js4
-rw-r--r--static/js/pad_userlist.js2
-rw-r--r--static/js/pad_utils.js8
-rw-r--r--static/js/timeslider.js20
-rw-r--r--static/js/undomodule.js4
23 files changed, 88 insertions, 89 deletions
diff --git a/static/js/Changeset.js b/static/js/Changeset.js
index 81c0c81b..fd1900ba 100644
--- a/static/js/Changeset.js
+++ b/static/js/Changeset.js
@@ -25,7 +25,7 @@
* limitations under the License.
*/
-var AttributePoolFactory = require("/AttributePoolFactory");
+var AttributePoolFactory = require("./AttributePoolFactory");
var _opt = null;
diff --git a/static/js/ace.js b/static/js/ace.js
index 22d4eaa6..789aba52 100644
--- a/static/js/ace.js
+++ b/static/js/ace.js
@@ -28,7 +28,7 @@ Ace2Editor.registry = {
nextId: 1
};
-var plugins = require('/plugins').plugins;
+var plugins = require('./plugins').plugins;
function Ace2Editor()
{
diff --git a/static/js/ace2_common.js b/static/js/ace2_common.js
index 0f8195fa..9f217045 100644
--- a/static/js/ace2_common.js
+++ b/static/js/ace2_common.js
@@ -20,7 +20,7 @@
* limitations under the License.
*/
-var Security = require('/security');
+var Security = require('./security');
function isNodeText(node)
{
diff --git a/static/js/ace2_inner.js b/static/js/ace2_inner.js
index 17d02036..66f19faf 100644
--- a/static/js/ace2_inner.js
+++ b/static/js/ace2_inner.js
@@ -20,7 +20,7 @@
* limitations under the License.
*/
-var Ace2Common = require('/ace2_common');
+var Ace2Common = require('./ace2_common');
// Extract useful method defined in the other module.
var isNodeText = Ace2Common.isNodeText;
@@ -38,18 +38,17 @@ var htmlPrettyEscape = Ace2Common.htmlPrettyEscape;
var map = Ace2Common.map;
var noop = Ace2Common.noop;
-var makeChangesetTracker = require('/changesettracker').makeChangesetTracker;
-var colorutils = require('/colorutils').colorutils;
-var makeContentCollector = require('/contentcollector').makeContentCollector;
-var makeCSSManager = require('/cssmanager').makeCSSManager;
-var domline = require('/domline').domline;
-var AttribPool = require('/AttributePoolFactory').createAttributePool;
-var Changeset = require('/Changeset');
-var linestylefilter = require('/linestylefilter').linestylefilter;
-var newSkipList = require('/skiplist').newSkipList;
-var undoModule = require('/undomodule').undoModule;
-var makeVirtualLineView = require('/virtual_lines').makeVirtualLineView;
-
+var makeChangesetTracker = require('./changesettracker').makeChangesetTracker;
+var colorutils = require('./colorutils').colorutils;
+var makeContentCollector = require('./contentcollector').makeContentCollector;
+var makeCSSManager = require('./cssmanager').makeCSSManager;
+var domline = require('./domline').domline;
+var AttribPool = require('./AttributePoolFactory').createAttributePool;
+var Changeset = require('./Changeset');
+var linestylefilter = require('./linestylefilter').linestylefilter;
+var newSkipList = require('./skiplist').newSkipList;
+var undoModule = require('./undomodule').undoModule;
+var makeVirtualLineView = require('./virtual_lines').makeVirtualLineView;
function Ace2Inner(){
var DEBUG = false; //$$ build script replaces the string "var DEBUG=true;//$$" with "var DEBUG=false;"
diff --git a/static/js/broadcast.js b/static/js/broadcast.js
index 97256bbf..485db44f 100644
--- a/static/js/broadcast.js
+++ b/static/js/broadcast.js
@@ -20,12 +20,12 @@
* limitations under the License.
*/
-var makeCSSManager = require('/cssmanager').makeCSSManager;
-var domline = require('/domline').domline;
-var AttribPool = require('/AttributePoolFactory').createAttributePool;
-var Changeset = require('/Changeset');
-var linestylefilter = require('/linestylefilter').linestylefilter;
-var colorutils = require('/colorutils').colorutils;
+var makeCSSManager = require('./cssmanager').makeCSSManager;
+var domline = require('./domline').domline;
+var AttribPool = require('./AttributePoolFactory').createAttributePool;
+var Changeset = require('./Changeset');
+var linestylefilter = require('./linestylefilter').linestylefilter;
+var colorutils = require('./colorutils').colorutils;
var Ace2Common = require('./ace2_common');
var map = Ace2Common.map;
diff --git a/static/js/changesettracker.js b/static/js/changesettracker.js
index e34dc107..b0219852 100644
--- a/static/js/changesettracker.js
+++ b/static/js/changesettracker.js
@@ -20,8 +20,8 @@
* limitations under the License.
*/
-var AttribPool = require('/AttributePoolFactory').createAttributePool;
-var Changeset = require('/Changeset');
+var AttribPool = require('./AttributePoolFactory').createAttributePool;
+var Changeset = require('./Changeset');
function makeChangesetTracker(scheduler, apool, aceCallbacksProvider)
{
diff --git a/static/js/chat.js b/static/js/chat.js
index 8f076af6..b8f22e9e 100644
--- a/static/js/chat.js
+++ b/static/js/chat.js
@@ -20,8 +20,8 @@
* limitations under the License.
*/
-var padutils = require('/pad_utils').padutils;
-var padcookie = require('/pad_cookie').padcookie;
+var padutils = require('./pad_utils').padutils;
+var padcookie = require('./pad_cookie').padcookie;
var chat = (function()
{
diff --git a/static/js/collab_client.js b/static/js/collab_client.js
index bb68f604..18e3616b 100644
--- a/static/js/collab_client.js
+++ b/static/js/collab_client.js
@@ -20,7 +20,7 @@
* limitations under the License.
*/
-var chat = require('/chat').chat;
+var chat = require('./chat').chat;
// Dependency fill on init. This exists for `pad.socket` only.
// TODO: bind directly to the socket.
diff --git a/static/js/contentcollector.js b/static/js/contentcollector.js
index 96dc4b7d..616e6e2b 100644
--- a/static/js/contentcollector.js
+++ b/static/js/contentcollector.js
@@ -25,8 +25,8 @@
var _MAX_LIST_LEVEL = 8;
-var Changeset = require('/Changeset');
-var plugins = require('/plugins').plugins;
+var Changeset = require('./Changeset');
+var plugins = require('./plugins').plugins;
function sanitizeUnicode(s)
{
diff --git a/static/js/domline.js b/static/js/domline.js
index 3074c9e9..e2491633 100644
--- a/static/js/domline.js
+++ b/static/js/domline.js
@@ -26,9 +26,9 @@
// requires: plugins
// requires: undefined
-var Security = require('/security');
-var Ace2Common = require('/ace2_common');
-var plugins = require('/plugins').plugins;
+var Security = require('./security');
+var Ace2Common = require('./ace2_common');
+var plugins = require('./plugins').plugins;
var map = Ace2Common.map;
var noop = Ace2Common.noop;
var identity = Ace2Common.identity;
diff --git a/static/js/linestylefilter.js b/static/js/linestylefilter.js
index 4b455724..2b9baebc 100644
--- a/static/js/linestylefilter.js
+++ b/static/js/linestylefilter.js
@@ -28,9 +28,9 @@
// requires: plugins
// requires: undefined
-var Changeset = require('/Changeset');
-var plugins = require('/plugins').plugins;
-var map = require('/ace2_common').map;
+var Changeset = require('./Changeset');
+var plugins = require('./plugins').plugins;
+var map = require('./ace2_common').map;
var linestylefilter = {};
diff --git a/static/js/pad.js b/static/js/pad.js
index bda68956..d19cface 100644
--- a/static/js/pad.js
+++ b/static/js/pad.js
@@ -26,29 +26,29 @@ var socket;
// These jQuery things should create local references, but for now `require()`
// assigns to the global `$` and augments it with plugins.
-require('/jquery');
-require('/farbtastic');
-require('/excanvas');
-JSON = require('/json2');
-require('/undo-xpopup');
-require('/prefixfree');
-
-var chat = require('/chat').chat;
-var getCollabClient = require('/collab_client').getCollabClient;
-var padconnectionstatus = require('/pad_connectionstatus').padconnectionstatus;
-var padcookie = require('/pad_cookie').padcookie;
-var paddocbar = require('/pad_docbar').paddocbar;
-var padeditbar = require('/pad_editbar').padeditbar;
-var padeditor = require('/pad_editor').padeditor;
-var padimpexp = require('/pad_impexp').padimpexp;
-var padmodals = require('/pad_modals').padmodals;
-var padsavedrevs = require('/pad_savedrevs').padsavedrevs;
-var paduserlist = require('/pad_userlist').paduserlist;
-var padutils = require('/pad_utils').padutils;
-
-var createCookie = require('/pad_utils').createCookie;
-var readCookie = require('/pad_utils').readCookie;
-var randomString = require('/pad_utils').randomString;
+require('./jquery');
+require('./farbtastic');
+require('./excanvas');
+JSON = require('./json2');
+require('./undo-xpopup');
+require('./prefixfree');
+
+var chat = require('./chat').chat;
+var getCollabClient = require('./collab_client').getCollabClient;
+var padconnectionstatus = require('./pad_connectionstatus').padconnectionstatus;
+var padcookie = require('./pad_cookie').padcookie;
+var paddocbar = require('./pad_docbar').paddocbar;
+var padeditbar = require('./pad_editbar').padeditbar;
+var padeditor = require('./pad_editor').padeditor;
+var padimpexp = require('./pad_impexp').padimpexp;
+var padmodals = require('./pad_modals').padmodals;
+var padsavedrevs = require('./pad_savedrevs').padsavedrevs;
+var paduserlist = require('./pad_userlist').paduserlist;
+var padutils = require('./pad_utils').padutils;
+
+var createCookie = require('./pad_utils').createCookie;
+var readCookie = require('./pad_utils').readCookie;
+var randomString = require('./pad_utils').randomString;
function getParams()
{
diff --git a/static/js/pad_connectionstatus.js b/static/js/pad_connectionstatus.js
index 1de024e8..bb0f0521 100644
--- a/static/js/pad_connectionstatus.js
+++ b/static/js/pad_connectionstatus.js
@@ -20,7 +20,7 @@
* limitations under the License.
*/
-var padmodals = require('/pad_modals').padmodals;
+var padmodals = require('./pad_modals').padmodals;
var padconnectionstatus = (function()
{
diff --git a/static/js/pad_docbar.js b/static/js/pad_docbar.js
index b83bf3bf..08bbb0c4 100644
--- a/static/js/pad_docbar.js
+++ b/static/js/pad_docbar.js
@@ -20,7 +20,7 @@
* limitations under the License.
*/
-var padutils = require('/pad_utils').padutils;
+var padutils = require('./pad_utils').padutils;
var paddocbar = (function()
{
@@ -449,7 +449,7 @@ var paddocbar = (function()
handleResizePage: function()
{
// Side-step circular reference. This should be injected.
- var padsavedrevs = require('/pad_savedrevs').padsavedrevs;
+ var padsavedrevs = require('./pad_savedrevs').padsavedrevs;
padsavedrevs.handleResizePage();
},
hideLaterIfNoOtherInteraction: function()
diff --git a/static/js/pad_editbar.js b/static/js/pad_editbar.js
index 23692631..04f03992 100644
--- a/static/js/pad_editbar.js
+++ b/static/js/pad_editbar.js
@@ -20,9 +20,9 @@
* limitations under the License.
*/
-var padutils = require('/pad_utils').padutils;
-var padeditor = require('/pad_editor').padeditor;
-var padsavedrevs = require('/pad_savedrevs').padsavedrevs;
+var padutils = require('./pad_utils').padutils;
+var padeditor = require('./pad_editor').padeditor;
+var padsavedrevs = require('./pad_savedrevs').padsavedrevs;
function indexOf(array, value) {
for (var i = 0, ii = array.length; i < ii; i++) {
diff --git a/static/js/pad_editor.js b/static/js/pad_editor.js
index 3dd67544..12f83aeb 100644
--- a/static/js/pad_editor.js
+++ b/static/js/pad_editor.js
@@ -20,8 +20,8 @@
* limitations under the License.
*/
-var padcookie = require('/pad_cookie').padcookie;
-var padutils = require('/pad_utils').padutils;
+var padcookie = require('./pad_cookie').padcookie;
+var padutils = require('./pad_utils').padutils;
var padeditor = (function()
{
@@ -34,7 +34,7 @@ var padeditor = (function()
viewZoom: 100,
init: function(readyFunc, initialViewOptions, _pad)
{
- Ace2Editor = require('/ace').Ace2Editor;
+ Ace2Editor = require('./ace').Ace2Editor;
pad = _pad;
settings = pad.settings;
diff --git a/static/js/pad_impexp.js b/static/js/pad_impexp.js
index 9ff09d19..23655ba4 100644
--- a/static/js/pad_impexp.js
+++ b/static/js/pad_impexp.js
@@ -20,7 +20,7 @@
* limitations under the License.
*/
-var paddocbar = require('/pad_docbar').paddocbar;
+var paddocbar = require('./pad_docbar').paddocbar;
var padimpexp = (function()
{
diff --git a/static/js/pad_modals.js b/static/js/pad_modals.js
index b78e28f4..0dd281bb 100644
--- a/static/js/pad_modals.js
+++ b/static/js/pad_modals.js
@@ -20,8 +20,8 @@
* limitations under the License.
*/
-var padutils = require('/pad_utils').padutils;
-var paddocbar = require('/pad_docbar').paddocbar;
+var padutils = require('./pad_utils').padutils;
+var paddocbar = require('./pad_docbar').paddocbar;
var padmodals = (function()
{
diff --git a/static/js/pad_savedrevs.js b/static/js/pad_savedrevs.js
index 6d37dfa8..2a0f4fde 100644
--- a/static/js/pad_savedrevs.js
+++ b/static/js/pad_savedrevs.js
@@ -20,8 +20,8 @@
* limitations under the License.
*/
-var padutils = require('/pad_utils').padutils;
-var paddocbar = require('/pad_docbar').paddocbar;
+var padutils = require('./pad_utils').padutils;
+var paddocbar = require('./pad_docbar').paddocbar;
var padsavedrevs = (function()
{
diff --git a/static/js/pad_userlist.js b/static/js/pad_userlist.js
index 2c063d74..5a3f9b35 100644
--- a/static/js/pad_userlist.js
+++ b/static/js/pad_userlist.js
@@ -20,7 +20,7 @@
* limitations under the License.
*/
-var padutils = require('/pad_utils').padutils;
+var padutils = require('./pad_utils').padutils;
var myUserInfo = {};
diff --git a/static/js/pad_utils.js b/static/js/pad_utils.js
index fb538211..8f7347bf 100644
--- a/static/js/pad_utils.js
+++ b/static/js/pad_utils.js
@@ -20,7 +20,7 @@
* limitations under the License.
*/
-var Security = require('/security');
+var Security = require('./security');
/**
* Generates a random String with the given length. Is needed to generate the Author, Group, readonly, session Ids
@@ -75,7 +75,7 @@ var padutils = {
},
uniqueId: function()
{
- var pad = require('/pad').pad; // Sidestep circular dependency
+ var pad = require('./pad').pad; // Sidestep circular dependency
function encodeNum(n, width)
{
// returns string that is exactly 'width' chars, padding with zeros
@@ -250,7 +250,7 @@ var padutils = {
},
timediff: function(d)
{
- var pad = require('/pad').pad; // Sidestep circular dependency
+ var pad = require('./pad').pad; // Sidestep circular dependency
function format(n, word)
{
n = Math.round(n);
@@ -520,7 +520,7 @@ function setupGlobalExceptionHandler() {
padutils.setupGlobalExceptionHandler = setupGlobalExceptionHandler;
-padutils.binarySearch = require('/ace2_common').binarySearch;
+padutils.binarySearch = require('./ace2_common').binarySearch;
exports.randomString = randomString;
exports.createCookie = createCookie;
diff --git a/static/js/timeslider.js b/static/js/timeslider.js
index 143ef328..579dcb60 100644
--- a/static/js/timeslider.js
+++ b/static/js/timeslider.js
@@ -22,13 +22,13 @@
// These jQuery things should create local references, but for now `require()`
// assigns to the global `$` and augments it with plugins.
-require('/jquery');
-JSON = require('/json2');
-require('/undo-xpopup');
+require('./jquery');
+JSON = require('./json2');
+require('./undo-xpopup');
-var createCookie = require('/pad_utils').createCookie;
-var readCookie = require('/pad_utils').readCookie;
-var randomString = require('/pad_utils').randomString;
+var createCookie = require('./pad_utils').createCookie;
+var readCookie = require('./pad_utils').readCookie;
+var randomString = require('./pad_utils').randomString;
var socket, token, padId, export_links;
@@ -127,12 +127,12 @@ function handleClientVars(message)
clientVars = message.data;
//load all script that doesn't work without the clientVars
- BroadcastSlider = require('/broadcast_slider').loadBroadcastSliderJS(fireWhenAllScriptsAreLoaded);
- require('/broadcast_revisions').loadBroadcastRevisionsJS();
- changesetLoader = require('/broadcast').loadBroadcastJS(socket, sendSocketMsg, fireWhenAllScriptsAreLoaded, BroadcastSlider);
+ BroadcastSlider = require('./broadcast_slider').loadBroadcastSliderJS(fireWhenAllScriptsAreLoaded);
+ require('./broadcast_revisions').loadBroadcastRevisionsJS();
+ changesetLoader = require('./broadcast').loadBroadcastJS(socket, sendSocketMsg, fireWhenAllScriptsAreLoaded, BroadcastSlider);
//initialize export ui
- require('/pad_impexp').padimpexp.init();
+ require('./pad_impexp').padimpexp.init();
//change export urls when the slider moves
var export_rev_regex = /(\/\d+)?\/export/
diff --git a/static/js/undomodule.js b/static/js/undomodule.js
index 886cbdf0..8b0c0909 100644
--- a/static/js/undomodule.js
+++ b/static/js/undomodule.js
@@ -20,8 +20,8 @@
* limitations under the License.
*/
-var Changeset = require('/Changeset');
-var extend = require('/ace2_common').extend;
+var Changeset = require('./Changeset');
+var extend = require('./ace2_common').extend;
var undoModule = (function()
{