First stab at getting client side require(plugin/..) to work from within etherpad

This commit is contained in:
Egil Moeller 2012-02-26 17:48:17 +01:00
parent fd5b7c1080
commit 763361a7c9
40 changed files with 122 additions and 122 deletions

View file

@ -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;