Implement `require` for most modules.

pull/343/head
Chad Weider 2012-01-15 20:16:11 -08:00
parent 72d29b1c62
commit 7f98116a43
11 changed files with 55 additions and 0 deletions

View File

@ -20,6 +20,35 @@
* limitations under the License.
*/
var Ace2Common = require('/ace2_common');
// Extract useful method defined in the other module.
var isNodeText = Ace2Common.isNodeText;
var object = Ace2Common.object;
var extend = Ace2Common.extend;
var forEach = Ace2Common.forEach;
var map = Ace2Common.map;
var filter = Ace2Common.filter;
var isArray = Ace2Common.isArray;
var browser = Ace2Common.browser;
var getAssoc = Ace2Common.getAssoc;
var setAssoc = Ace2Common.setAssoc;
var binarySearch = Ace2Common.binarySearch;
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('/easysync2').AttribPool;
var Changeset = require('/easysync2').Changeset;
var linestylefilter = require('/linestylefilter').linestylefilter;
var newSkipList = require('/skiplist').newSkipList;
var undoModule = require('/undomodule').undoModule;
var makeVirtualLineView = require('/virtual_lines').makeVirtualLineView;
function OUTER(gscope)
{

View File

@ -22,6 +22,12 @@
var global = this;
var makeCSSManager = require('/cssmanager_client').makeCSSManager;
var domline = require('/domline_client').domline;
var Changeset = require('/easysync2_client').Changeset;
var AttribPool = require('/easysync2_client').AttribPool;
var linestylefilter = require('/linestylefilter_client').linestylefilter;
function loadBroadcastJS()
{
// just in case... (todo: this must be somewhere else in the client code.)

View File

@ -20,6 +20,8 @@
* limitations under the License.
*/
var Changeset = require('/easysync2').Changeset;
var AttribPool = require('/easysync2').AttribPool;
function makeChangesetTracker(scheduler, apool, aceCallbacksProvider)
{

View File

@ -20,6 +20,8 @@
* limitations under the License.
*/
var padutils = require('/pad_utils').padutils;
var chat = (function()
{
var bottomMargin = "0px";

View File

@ -25,6 +25,8 @@ $(window).bind("load", function()
getCollabClient.windowLoaded = true;
});
var chat = require('/chat').chat;
// Dependency fill on init. This exists for `pad.socket` only.
// TODO: bind directly to the socket.
var pad = undefined;

View File

@ -25,6 +25,8 @@
var _MAX_LIST_LEVEL = 8;
var Changeset = require('/easysync2').Changeset
function sanitizeUnicode(s)
{
return s.replace(/[\uffff\ufffe\ufeff\ufdd0-\ufdef\ud800-\udfff]/g, '?');

View File

@ -27,6 +27,9 @@
// requires: top
// requires: plugins
// requires: undefined
var Changeset = require('/easysync2').Changeset
var linestylefilter = {};
linestylefilter.ATTRIB_CLASSES = {

View File

@ -25,6 +25,9 @@
// requires: top
// requires: plugins
// requires: undefined
var Changeset = require('/easysync2_client').Changeset
var linestylefilter = {};
linestylefilter.ATTRIB_CLASSES = {

View File

@ -32,6 +32,9 @@ settings.globalUserName = false;
settings.hideQRCode = false;
settings.rtlIsTrue = false;
var chat = require('/chat').chat;
var getCollabClient = require('/collab_client').getCollabClient;
$(document).ready(function()
{
//start the costum js

View File

@ -20,6 +20,7 @@
* limitations under the License.
*/
var Ace2Editor = require('/ace').Ace2Editor;
var padeditor = (function()
{

View File

@ -20,6 +20,8 @@
* limitations under the License.
*/
var Changeset = require('/easysync2').Changeset;
var extend = require('/ace2_common').extend;
var undoModule = (function()
{