mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-31 19:02:59 +01:00
First stab at getting client side require(plugin/..) to work from within etherpad
This commit is contained in:
parent
fd5b7c1080
commit
763361a7c9
40 changed files with 122 additions and 122 deletions
|
@ -16,7 +16,7 @@ log4js.setGlobalLogLevel("INFO");
|
|||
var async = require("async");
|
||||
var db = require('../node/db/DB');
|
||||
var CommonCode = require('../node/utils/common_code');
|
||||
var Changeset = CommonCode.require("/Changeset");
|
||||
var Changeset = require("ep_etherpad-lite/static/js/Changeset");
|
||||
var padManager;
|
||||
|
||||
async.series([
|
||||
|
|
|
@ -4,9 +4,9 @@ var fs = require("fs");
|
|||
var ueberDB = require("ueberDB");
|
||||
var mysql = require("mysql");
|
||||
var async = require("async");
|
||||
var Changeset = CommonCode.require("/Changeset");
|
||||
var randomString = CommonCode.require('/pad_utils').randomString;
|
||||
var AttributePoolFactory = CommonCode.require("/AttributePoolFactory");
|
||||
var Changeset = require("ep_etherpad-lite/static/js/Changeset");
|
||||
var randomString = require('ep_etherpad-lite/static/js/pad_utils').randomString;
|
||||
var AttributePoolFactory = require("ep_etherpad-lite/static/js/AttributePoolFactory");
|
||||
|
||||
var settingsFile = process.argv[2];
|
||||
var sqlOutputFile = process.argv[3];
|
||||
|
|
|
@ -22,7 +22,7 @@ var CommonCode = require('../utils/common_code');
|
|||
var ERR = require("async-stacktrace");
|
||||
var db = require("./DB").db;
|
||||
var async = require("async");
|
||||
var randomString = CommonCode.require('/pad_utils').randomString;
|
||||
var randomString = require('ep_etherpad-lite/static/js/pad_utils').randomString;
|
||||
|
||||
/**
|
||||
* Checks if the author exists
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
var CommonCode = require('../utils/common_code');
|
||||
var ERR = require("async-stacktrace");
|
||||
var customError = require("../utils/customError");
|
||||
var randomString = CommonCode.require('/pad_utils').randomString;
|
||||
var randomString = require('ep_etherpad-lite/static/js/pad_utils').randomString;
|
||||
var db = require("./DB").db;
|
||||
var async = require("async");
|
||||
var padManager = require("./PadManager");
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
|
||||
var CommonCode = require('../utils/common_code');
|
||||
var ERR = require("async-stacktrace");
|
||||
var Changeset = CommonCode.require("/Changeset");
|
||||
var AttributePoolFactory = CommonCode.require("/AttributePoolFactory");
|
||||
var randomString = CommonCode.require('/pad_utils').randomString;
|
||||
var Changeset = require("ep_etherpad-lite/static/js/Changeset");
|
||||
var AttributePoolFactory = require("ep_etherpad-lite/static/js/AttributePoolFactory");
|
||||
var randomString = require('ep_etherpad-lite/static/js/pad_utils').randomString;
|
||||
var db = require("./DB").db;
|
||||
var async = require("async");
|
||||
var settings = require('../utils/Settings');
|
||||
|
|
|
@ -22,7 +22,7 @@ var CommonCode = require('../utils/common_code');
|
|||
var ERR = require("async-stacktrace");
|
||||
var db = require("./DB").db;
|
||||
var async = require("async");
|
||||
var randomString = CommonCode.require('/pad_utils').randomString;
|
||||
var randomString = require('ep_etherpad-lite/static/js/pad_utils').randomString;
|
||||
|
||||
/**
|
||||
* returns a read only id for a pad
|
||||
|
|
|
@ -26,7 +26,7 @@ var authorManager = require("./AuthorManager");
|
|||
var padManager = require("./PadManager");
|
||||
var sessionManager = require("./SessionManager");
|
||||
var settings = require("../utils/Settings")
|
||||
var randomString = CommonCode.require('/pad_utils').randomString;
|
||||
var randomString = require('ep_etherpad-lite/static/js/pad_utils').randomString;
|
||||
|
||||
/**
|
||||
* This function controlls the access to a pad, it checks if the user can access a pad.
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
var CommonCode = require('../utils/common_code');
|
||||
var ERR = require("async-stacktrace");
|
||||
var customError = require("../utils/customError");
|
||||
var randomString = CommonCode.require('/pad_utils').randomString;
|
||||
var randomString = require('ep_etherpad-lite/static/js/pad_utils').randomString;
|
||||
var db = require("./DB").db;
|
||||
var async = require("async");
|
||||
var groupMangager = require("./GroupManager");
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
*/
|
||||
|
||||
var CommonCode = require('./utils/common_code');
|
||||
var Changeset = CommonCode.require("/Changeset");
|
||||
var AttributePoolFactory = CommonCode.require("/AttributePoolFactory");
|
||||
var Changeset = require("ep_etherpad-lite/static/js/Changeset");
|
||||
var AttributePoolFactory = require("ep_etherpad-lite/static/js/AttributePoolFactory");
|
||||
|
||||
function random() {
|
||||
this.nextInt = function (maxValue) {
|
||||
|
|
|
@ -23,7 +23,7 @@ var ERR = require("async-stacktrace");
|
|||
var fs = require("fs");
|
||||
var api = require("../db/API");
|
||||
var padManager = require("../db/PadManager");
|
||||
var randomString = CommonCode.require('/pad_utils').randomString;
|
||||
var randomString = require('ep_etherpad-lite/static/js/pad_utils').randomString;
|
||||
|
||||
//ensure we have an apikey
|
||||
var apikey = null;
|
||||
|
|
|
@ -22,8 +22,8 @@ var CommonCode = require('../utils/common_code');
|
|||
var ERR = require("async-stacktrace");
|
||||
var async = require("async");
|
||||
var padManager = require("../db/PadManager");
|
||||
var Changeset = CommonCode.require("/Changeset");
|
||||
var AttributePoolFactory = CommonCode.require("/AttributePoolFactory");
|
||||
var Changeset = require("ep_etherpad-lite/static/js/Changeset");
|
||||
var AttributePoolFactory = require("ep_etherpad-lite/static/js/AttributePoolFactory");
|
||||
var authorManager = require("../db/AuthorManager");
|
||||
var readOnlyManager = require("../db/ReadOnlyManager");
|
||||
var settings = require('../utils/Settings');
|
||||
|
|
|
@ -22,8 +22,8 @@ var CommonCode = require('../utils/common_code');
|
|||
var ERR = require("async-stacktrace");
|
||||
var async = require("async");
|
||||
var padManager = require("../db/PadManager");
|
||||
var Changeset = CommonCode.require("/Changeset");
|
||||
var AttributePoolFactory = CommonCode.require("/AttributePoolFactory");
|
||||
var Changeset = require("ep_etherpad-lite/static/js/Changeset");
|
||||
var AttributePoolFactory = require("ep_etherpad-lite/static/js/AttributePoolFactory");
|
||||
var settings = require('../utils/Settings');
|
||||
var authorManager = require("../db/AuthorManager");
|
||||
var log4js = require('log4js');
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
var async = require("async");
|
||||
var CommonCode = require('./common_code');
|
||||
var Changeset = CommonCode.require("/Changeset");
|
||||
var Changeset = require("ep_etherpad-lite/static/js/Changeset");
|
||||
var padManager = require("../db/PadManager");
|
||||
|
||||
function getPadDokuWiki(pad, revNum, callback)
|
||||
|
|
|
@ -16,10 +16,10 @@
|
|||
|
||||
var CommonCode = require('./common_code');
|
||||
var async = require("async");
|
||||
var Changeset = CommonCode.require("/Changeset");
|
||||
var Changeset = require("ep_etherpad-lite/static/js/Changeset");
|
||||
var padManager = require("../db/PadManager");
|
||||
var ERR = require("async-stacktrace");
|
||||
var Security = CommonCode.require('/security');
|
||||
var Security = require('ep_etherpad-lite/static/js/security');
|
||||
|
||||
function getPadPlainText(pad, revNum)
|
||||
{
|
||||
|
|
|
@ -18,9 +18,9 @@ var jsdom = require('jsdom-nocontextifiy').jsdom;
|
|||
var log4js = require('log4js');
|
||||
|
||||
var CommonCode = require('../utils/common_code');
|
||||
var Changeset = CommonCode.require("/Changeset");
|
||||
var contentcollector = CommonCode.require("/contentcollector");
|
||||
var map = CommonCode.require("/ace2_common").map;
|
||||
var Changeset = require("ep_etherpad-lite/static/js/Changeset");
|
||||
var contentcollector = require("ep_etherpad-lite/static/js/contentcollector");
|
||||
var map = require("ep_etherpad-lite/static/js/ace2_common").map;
|
||||
|
||||
function setPadHTML(pad, html, callback)
|
||||
{
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
var AttributePoolFactory = require("/AttributePoolFactory");
|
||||
var AttributePoolFactory = require("ep_etherpad-lite/static/js/AttributePoolFactory");
|
||||
|
||||
var _opt = null;
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ Ace2Editor.registry = {
|
|||
nextId: 1
|
||||
};
|
||||
|
||||
var plugins = require('/plugins').plugins;
|
||||
var plugins = require('ep_etherpad-lite/static/js/plugins').plugins;
|
||||
|
||||
function Ace2Editor()
|
||||
{
|
||||
|
@ -233,14 +233,14 @@ function Ace2Editor()
|
|||
if (Ace2Editor.EMBEDED && Ace2Editor.EMBEDED[ACE_SOURCE]) {
|
||||
buffer.push('<script type="text/javascript">');
|
||||
buffer.push(Ace2Editor.EMBEDED[ACE_SOURCE]);
|
||||
buffer.push('require("/ace2_inner");');
|
||||
buffer.push('require("ep_etherpad-lite/static/js/ace2_inner");');
|
||||
buffer.push('<\/script>');
|
||||
} else {
|
||||
file = ACE_SOURCE;
|
||||
file = file.replace(/^\.\.\/static\/js\//, '../minified/');
|
||||
buffer.push('<script type="application/javascript" src="' + file + '"><\/script>');
|
||||
buffer.push('<script type="text/javascript">');
|
||||
buffer.push('require("/ace2_inner");');
|
||||
buffer.push('require("ep_etherpad-lite/static/js/ace2_inner");');
|
||||
buffer.push('<\/script>');
|
||||
}
|
||||
}
|
||||
|
@ -322,7 +322,7 @@ function Ace2Editor()
|
|||
<script type="text/javascript">\
|
||||
require.define("/plugins", null);\n\
|
||||
require.define("/plugins.js", function (require, exports, module) {\
|
||||
module.exports = parent.parent.require("/plugins");\
|
||||
module.exports = parent.parent.require("ep_etherpad-lite/static/js/plugins");\
|
||||
});\
|
||||
</script>\
|
||||
');
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
var Security = require('/security');
|
||||
var Security = require('ep_etherpad-lite/static/js/security');
|
||||
|
||||
function isNodeText(node)
|
||||
{
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
var Ace2Common = require('/ace2_common');
|
||||
var Ace2Common = require('ep_etherpad-lite/static/js/ace2_common');
|
||||
// Extract useful method defined in the other module.
|
||||
var isNodeText = Ace2Common.isNodeText;
|
||||
var object = Ace2Common.object;
|
||||
|
@ -37,17 +37,17 @@ var binarySearchInfinite = Ace2Common.binarySearchInfinite;
|
|||
var htmlPrettyEscape = Ace2Common.htmlPrettyEscape;
|
||||
var map = Ace2Common.map;
|
||||
|
||||
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('ep_etherpad-lite/static/js/changesettracker').makeChangesetTracker;
|
||||
var colorutils = require('ep_etherpad-lite/static/js/colorutils').colorutils;
|
||||
var makeContentCollector = require('ep_etherpad-lite/static/js/contentcollector').makeContentCollector;
|
||||
var makeCSSManager = require('ep_etherpad-lite/static/js/cssmanager').makeCSSManager;
|
||||
var domline = require('ep_etherpad-lite/static/js/domline').domline;
|
||||
var AttribPool = require('ep_etherpad-lite/static/js/AttributePoolFactory').createAttributePool;
|
||||
var Changeset = require('ep_etherpad-lite/static/js/Changeset');
|
||||
var linestylefilter = require('ep_etherpad-lite/static/js/linestylefilter').linestylefilter;
|
||||
var newSkipList = require('ep_etherpad-lite/static/js/skiplist').newSkipList;
|
||||
var undoModule = require('ep_etherpad-lite/static/js/undomodule').undoModule;
|
||||
var makeVirtualLineView = require('ep_etherpad-lite/static/js/virtual_lines').makeVirtualLineView;
|
||||
|
||||
function OUTER(gscope)
|
||||
{
|
||||
|
|
|
@ -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('ep_etherpad-lite/static/js/cssmanager').makeCSSManager;
|
||||
var domline = require('ep_etherpad-lite/static/js/domline').domline;
|
||||
var AttribPool = require('ep_etherpad-lite/static/js/AttributePoolFactory').createAttributePool;
|
||||
var Changeset = require('ep_etherpad-lite/static/js/Changeset');
|
||||
var linestylefilter = require('ep_etherpad-lite/static/js/linestylefilter').linestylefilter;
|
||||
var colorutils = require('ep_etherpad-lite/static/js/colorutils').colorutils;
|
||||
|
||||
// These parameters were global, now they are injected. A reference to the
|
||||
// Timeslider controller would probably be more appropriate.
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
var AttribPool = require('/AttributePoolFactory').createAttributePool;
|
||||
var Changeset = require('/Changeset');
|
||||
var AttribPool = require('ep_etherpad-lite/static/js/AttributePoolFactory').createAttributePool;
|
||||
var Changeset = require('ep_etherpad-lite/static/js/Changeset');
|
||||
|
||||
function makeChangesetTracker(scheduler, apool, aceCallbacksProvider)
|
||||
{
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
var padutils = require('/pad_utils').padutils;
|
||||
var padcookie = require('/pad_cookie').padcookie;
|
||||
var padutils = require('ep_etherpad-lite/static/js/pad_utils').padutils;
|
||||
var padcookie = require('ep_etherpad-lite/static/js/pad_cookie').padcookie;
|
||||
|
||||
var chat = (function()
|
||||
{
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
var chat = require('/chat').chat;
|
||||
var chat = require('ep_etherpad-lite/static/js/chat').chat;
|
||||
|
||||
// Dependency fill on init. This exists for `pad.socket` only.
|
||||
// TODO: bind directly to the socket.
|
||||
|
|
|
@ -25,8 +25,8 @@
|
|||
|
||||
var _MAX_LIST_LEVEL = 8;
|
||||
|
||||
var Changeset = require('/Changeset');
|
||||
var plugins = require('/plugins').plugins;
|
||||
var Changeset = require('ep_etherpad-lite/static/js/Changeset');
|
||||
var plugins = require('ep_etherpad-lite/static/js/plugins').plugins;
|
||||
|
||||
function sanitizeUnicode(s)
|
||||
{
|
||||
|
|
|
@ -26,9 +26,9 @@
|
|||
// requires: plugins
|
||||
// requires: undefined
|
||||
|
||||
var Security = require('/security');
|
||||
var plugins = require('/plugins').plugins;
|
||||
var map = require('/ace2_common').map;
|
||||
var Security = require('ep_etherpad-lite/static/js/security');
|
||||
var plugins = require('ep_etherpad-lite/static/js/plugins').plugins;
|
||||
var map = require('ep_etherpad-lite/static/js/ace2_common').map;
|
||||
|
||||
var domline = {};
|
||||
domline.noop = function()
|
||||
|
|
|
@ -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('ep_etherpad-lite/static/js/Changeset');
|
||||
var plugins = require('ep_etherpad-lite/static/js/plugins').plugins;
|
||||
var map = require('ep_etherpad-lite/static/js/ace2_common').map;
|
||||
|
||||
var linestylefilter = {};
|
||||
|
||||
|
|
|
@ -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');
|
||||
require('ep_etherpad-lite/static/js/jquery');
|
||||
require('ep_etherpad-lite/static/js/farbtastic');
|
||||
require('ep_etherpad-lite/static/js/excanvas');
|
||||
JSON = require('ep_etherpad-lite/static/js/json2');
|
||||
require('ep_etherpad-lite/static/js/undo-xpopup');
|
||||
require('ep_etherpad-lite/static/js/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 chat = require('ep_etherpad-lite/static/js/chat').chat;
|
||||
var getCollabClient = require('ep_etherpad-lite/static/js/collab_client').getCollabClient;
|
||||
var padconnectionstatus = require('ep_etherpad-lite/static/js/pad_connectionstatus').padconnectionstatus;
|
||||
var padcookie = require('ep_etherpad-lite/static/js/pad_cookie').padcookie;
|
||||
var paddocbar = require('ep_etherpad-lite/static/js/pad_docbar').paddocbar;
|
||||
var padeditbar = require('ep_etherpad-lite/static/js/pad_editbar').padeditbar;
|
||||
var padeditor = require('ep_etherpad-lite/static/js/pad_editor').padeditor;
|
||||
var padimpexp = require('ep_etherpad-lite/static/js/pad_impexp').padimpexp;
|
||||
var padmodals = require('ep_etherpad-lite/static/js/pad_modals').padmodals;
|
||||
var padsavedrevs = require('ep_etherpad-lite/static/js/pad_savedrevs').padsavedrevs;
|
||||
var paduserlist = require('ep_etherpad-lite/static/js/pad_userlist').paduserlist;
|
||||
var padutils = require('ep_etherpad-lite/static/js/pad_utils').padutils;
|
||||
|
||||
var createCookie = require('/pad_utils').createCookie;
|
||||
var readCookie = require('/pad_utils').readCookie;
|
||||
var randomString = require('/pad_utils').randomString;
|
||||
var createCookie = require('ep_etherpad-lite/static/js/pad_utils').createCookie;
|
||||
var readCookie = require('ep_etherpad-lite/static/js/pad_utils').readCookie;
|
||||
var randomString = require('ep_etherpad-lite/static/js/pad_utils').randomString;
|
||||
|
||||
function getParams()
|
||||
{
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
var padmodals = require('/pad_modals').padmodals;
|
||||
var padmodals = require('ep_etherpad-lite/static/js/pad_modals').padmodals;
|
||||
|
||||
var padconnectionstatus = (function()
|
||||
{
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
var padutils = require('/pad_utils').padutils;
|
||||
var padutils = require('ep_etherpad-lite/static/js/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('ep_etherpad-lite/static/js/pad_savedrevs').padsavedrevs;
|
||||
padsavedrevs.handleResizePage();
|
||||
},
|
||||
hideLaterIfNoOtherInteraction: function()
|
||||
|
|
|
@ -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('ep_etherpad-lite/static/js/pad_utils').padutils;
|
||||
var padeditor = require('ep_etherpad-lite/static/js/pad_editor').padeditor;
|
||||
var padsavedrevs = require('ep_etherpad-lite/static/js/pad_savedrevs').padsavedrevs;
|
||||
|
||||
function indexOf(array, value) {
|
||||
for (var i = 0, ii = array.length; i < ii; i++) {
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
var padcookie = require('/pad_cookie').padcookie;
|
||||
var padutils = require('/pad_utils').padutils;
|
||||
var padcookie = require('ep_etherpad-lite/static/js/pad_cookie').padcookie;
|
||||
var padutils = require('ep_etherpad-lite/static/js/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('ep_etherpad-lite/static/js/ace').Ace2Editor;
|
||||
pad = _pad;
|
||||
settings = pad.settings;
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
var paddocbar = require('/pad_docbar').paddocbar;
|
||||
var paddocbar = require('ep_etherpad-lite/static/js/pad_docbar').paddocbar;
|
||||
|
||||
var padimpexp = (function()
|
||||
{
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
var padutils = require('/pad_utils').padutils;
|
||||
var paddocbar = require('/pad_docbar').paddocbar;
|
||||
var padutils = require('ep_etherpad-lite/static/js/pad_utils').padutils;
|
||||
var paddocbar = require('ep_etherpad-lite/static/js/pad_docbar').paddocbar;
|
||||
|
||||
var padmodals = (function()
|
||||
{
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
var padutils = require('/pad_utils').padutils;
|
||||
var paddocbar = require('/pad_docbar').paddocbar;
|
||||
var padutils = require('ep_etherpad-lite/static/js/pad_utils').padutils;
|
||||
var paddocbar = require('ep_etherpad-lite/static/js/pad_docbar').paddocbar;
|
||||
|
||||
var padsavedrevs = (function()
|
||||
{
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
var padutils = require('/pad_utils').padutils;
|
||||
var padutils = require('ep_etherpad-lite/static/js/pad_utils').padutils;
|
||||
|
||||
var myUserInfo = {};
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
var Security = require('/security');
|
||||
var Security = require('ep_etherpad-lite/static/js/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('ep_etherpad-lite/static/js/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('ep_etherpad-lite/static/js/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('ep_etherpad-lite/static/js/ace2_common').binarySearch;
|
||||
|
||||
exports.randomString = randomString;
|
||||
exports.createCookie = createCookie;
|
||||
|
|
|
@ -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('ep_etherpad-lite/static/js/jquery');
|
||||
JSON = require('ep_etherpad-lite/static/js/json2');
|
||||
require('ep_etherpad-lite/static/js/undo-xpopup');
|
||||
|
||||
var createCookie = require('/pad_utils').createCookie;
|
||||
var readCookie = require('/pad_utils').readCookie;
|
||||
var randomString = require('/pad_utils').randomString;
|
||||
var createCookie = require('ep_etherpad-lite/static/js/pad_utils').createCookie;
|
||||
var readCookie = require('ep_etherpad-lite/static/js/pad_utils').readCookie;
|
||||
var randomString = require('ep_etherpad-lite/static/js/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('ep_etherpad-lite/static/js/broadcast_slider').loadBroadcastSliderJS(fireWhenAllScriptsAreLoaded);
|
||||
require('ep_etherpad-lite/static/js/broadcast_revisions').loadBroadcastRevisionsJS();
|
||||
changesetLoader = require('ep_etherpad-lite/static/js/broadcast').loadBroadcastJS(socket, sendSocketMsg, fireWhenAllScriptsAreLoaded, BroadcastSlider);
|
||||
|
||||
//initialize export ui
|
||||
require('/pad_impexp').padimpexp.init();
|
||||
require('ep_etherpad-lite/static/js/pad_impexp').padimpexp.init();
|
||||
|
||||
//change export urls when the slider moves
|
||||
var export_rev_regex = /(\/\d+)?\/export/
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
var Changeset = require('/Changeset');
|
||||
var extend = require('/ace2_common').extend;
|
||||
var Changeset = require('ep_etherpad-lite/static/js/Changeset');
|
||||
var extend = require('ep_etherpad-lite/static/js/ace2_common').extend;
|
||||
|
||||
var undoModule = (function()
|
||||
{
|
||||
|
|
|
@ -298,13 +298,13 @@
|
|||
(function () {
|
||||
require.setRootURI("../minified/");
|
||||
require.setGlobalKeyPath("require");
|
||||
require('/pad').init();
|
||||
require('ep_etherpad-lite/static/js/pad').init();
|
||||
|
||||
/* TODO: These globals shouldn't exist. */
|
||||
pad = require('/pad').pad;
|
||||
chat = require('/chat').chat;
|
||||
padeditbar = require('/pad_editbar').padeditbar;
|
||||
padimpexp = require('/pad_impexp').padimpexp;
|
||||
pad = require('ep_etherpad-lite/static/js/pad').pad;
|
||||
chat = require('ep_etherpad-lite/static/js/chat').chat;
|
||||
padeditbar = require('ep_etherpad-lite/static/js/pad_editbar').padeditbar;
|
||||
padimpexp = require('ep_etherpad-lite/static/js/pad_impexp').padimpexp;
|
||||
}());
|
||||
</script>
|
||||
|
||||
|
|
|
@ -206,11 +206,11 @@
|
|||
(function () {
|
||||
require.setRootURI("../minified/");
|
||||
require.setGlobalKeyPath("require");
|
||||
require('/timeslider').init();
|
||||
require('ep_etherpad-lite/static/js/timeslider').init();
|
||||
|
||||
/* TODO: These globals shouldn't exist. */
|
||||
padeditbar = require('/pad_editbar').padeditbar;
|
||||
padimpexp = require('/pad_impexp').padimpexp;
|
||||
padeditbar = require('ep_etherpad-lite/static/js/pad_editbar').padeditbar;
|
||||
padimpexp = require('ep_etherpad-lite/static/js/pad_impexp').padimpexp;
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
|
|
Loading…
Reference in a new issue