mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-02-01 03:12:42 +01:00
Bugfixes
This commit is contained in:
parent
90b359c82b
commit
61e0442ec7
6 changed files with 6128 additions and 6103 deletions
|
@ -20,11 +20,25 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
define(["ep_etherpad-lite/static/js/rjquery", "underscore", 'ep_etherpad-lite/static/js/pluginfw/hooks'], function ($, _, hooks) {
|
define(["ep_etherpad-lite/static/js/rjquery", "underscore", 'ep_etherpad-lite/static/js/pluginfw/hooks', 'ep_etherpad-lite/static/js/linestylefilter', 'ep_etherpad-lite/static/js/domline'], function ($, _, hooks, linestylefilterMod, domlineMod) {
|
||||||
|
var linestylefilter = linestylefilterMod.linestylefilter;
|
||||||
|
var domline = domlineMod.domline;
|
||||||
var exports = {};
|
var exports = {};
|
||||||
|
|
||||||
var browser = require('./browser').browser;
|
var browser = require('./browser').browser;
|
||||||
if(browser.msie){
|
var Ace2Common = require('./ace2_common');
|
||||||
|
var makeChangesetTracker = require('./changesettracker').makeChangesetTracker;
|
||||||
|
var colorutils = require('./colorutils').colorutils;
|
||||||
|
var makeContentCollector = require('./contentcollector').makeContentCollector;
|
||||||
|
var makeCSSManager = require('./cssmanager').makeCSSManager;
|
||||||
|
var AttribPool = require('./AttributePool');
|
||||||
|
var Changeset = require('./Changeset');
|
||||||
|
var ChangesetUtils = require('./ChangesetUtils');
|
||||||
|
var SkipList = require('./skiplist');
|
||||||
|
var undoModule = require('./undomodule').undoModule;
|
||||||
|
var AttributeManager = require('./AttributeManager');
|
||||||
|
|
||||||
|
if(browser.msie){
|
||||||
// Honestly fuck IE royally.
|
// Honestly fuck IE royally.
|
||||||
// Basically every hack we have since V11 causes a problem
|
// Basically every hack we have since V11 causes a problem
|
||||||
if(parseInt(browser.version) >= 11){
|
if(parseInt(browser.version) >= 11){
|
||||||
|
@ -32,11 +46,9 @@ if(browser.msie){
|
||||||
browser.chrome = true;
|
browser.chrome = true;
|
||||||
browser.modernIE = true;
|
browser.modernIE = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var Ace2Common = require('./ace2_common');
|
var isNodeText = Ace2Common.isNodeText,
|
||||||
|
|
||||||
var isNodeText = Ace2Common.isNodeText,
|
|
||||||
getAssoc = Ace2Common.getAssoc,
|
getAssoc = Ace2Common.getAssoc,
|
||||||
setAssoc = Ace2Common.setAssoc,
|
setAssoc = Ace2Common.setAssoc,
|
||||||
isTextNode = Ace2Common.isTextNode,
|
isTextNode = Ace2Common.isTextNode,
|
||||||
|
@ -44,21 +56,7 @@ var isNodeText = Ace2Common.isNodeText,
|
||||||
htmlPrettyEscape = Ace2Common.htmlPrettyEscape,
|
htmlPrettyEscape = Ace2Common.htmlPrettyEscape,
|
||||||
noop = Ace2Common.noop;
|
noop = Ace2Common.noop;
|
||||||
|
|
||||||
function Ace2Inner(editorInfo){
|
function Ace2Inner(editorInfo){
|
||||||
|
|
||||||
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('./AttributePool');
|
|
||||||
var Changeset = require('./Changeset');
|
|
||||||
var ChangesetUtils = require('./ChangesetUtils');
|
|
||||||
var linestylefilter = require('./linestylefilter').linestylefilter;
|
|
||||||
var SkipList = require('./skiplist');
|
|
||||||
var undoModule = require('./undomodule').undoModule;
|
|
||||||
var AttributeManager = require('./AttributeManager');
|
|
||||||
|
|
||||||
var DEBUG = false; //$$ build script replaces the string "var DEBUG=true;//$$" with "var DEBUG=false;"
|
var DEBUG = false; //$$ build script replaces the string "var DEBUG=true;//$$" with "var DEBUG=false;"
|
||||||
// changed to false
|
// changed to false
|
||||||
var isSetUp = false;
|
var isSetUp = false;
|
||||||
|
@ -482,7 +480,7 @@ function Ace2Inner(editorInfo){
|
||||||
dmesg(e.toString());
|
dmesg(e.toString());
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
var cs = currentCallStack;
|
var cs = currentCallStack;
|
||||||
|
@ -5461,12 +5459,12 @@ function Ace2Inner(editorInfo){
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.init = function (editorInfo) {
|
exports.init = function (editorInfo) {
|
||||||
var editor = new Ace2Inner(editorInfo)
|
var editor = new Ace2Inner(editorInfo)
|
||||||
editor.init();
|
editor.init();
|
||||||
};
|
};
|
||||||
|
|
||||||
return exports;
|
return exports;
|
||||||
});
|
});
|
||||||
|
|
|
@ -20,19 +20,19 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var makeCSSManager = require('./cssmanager').makeCSSManager;
|
define(['ep_etherpad-lite/static/js/pluginfw/hooks', 'ep_etherpad-lite/static/js/linestylefilter', 'ep_etherpad-lite/static/js/domline', 'underscore'], function (hooks, linetyleFilterMod, domlineMod, _) {
|
||||||
var domline = require('./domline').domline;
|
var exports = {};
|
||||||
var AttribPool = require('./AttributePool');
|
var makeCSSManager = require('./cssmanager').makeCSSManager;
|
||||||
var Changeset = require('./Changeset');
|
var domline = domlineMod.domline;
|
||||||
var linestylefilter = require('./linestylefilter').linestylefilter;
|
var AttribPool = require('./AttributePool');
|
||||||
var colorutils = require('./colorutils').colorutils;
|
var Changeset = require('./Changeset');
|
||||||
var _ = require('./underscore');
|
var linestylefilter = linetyleFilterMod.linestylefilter;
|
||||||
var hooks = require('ep_etherpad-lite/static/js/pluginfw/hooks');
|
var colorutils = require('./colorutils').colorutils;
|
||||||
|
|
||||||
// These parameters were global, now they are injected. A reference to the
|
// These parameters were global, now they are injected. A reference to the
|
||||||
// Timeslider controller would probably be more appropriate.
|
// Timeslider controller would probably be more appropriate.
|
||||||
function loadBroadcastJS(socket, sendSocketMsg, fireWhenAllScriptsAreLoaded, BroadcastSlider)
|
function loadBroadcastJS(socket, sendSocketMsg, fireWhenAllScriptsAreLoaded, BroadcastSlider)
|
||||||
{
|
{
|
||||||
var changesetLoader = undefined;
|
var changesetLoader = undefined;
|
||||||
|
|
||||||
// Below Array#indexOf code was direct pasted by AppJet/Etherpad, licence unknown. Possible source: http://www.tutorialspoint.com/javascript/array_indexof.htm
|
// Below Array#indexOf code was direct pasted by AppJet/Etherpad, licence unknown. Possible source: http://www.tutorialspoint.com/javascript/array_indexof.htm
|
||||||
|
@ -591,6 +591,9 @@ function loadBroadcastJS(socket, sendSocketMsg, fireWhenAllScriptsAreLoaded, Bro
|
||||||
receiveAuthorData(clientVars.collab_client_vars.historicalAuthorData);
|
receiveAuthorData(clientVars.collab_client_vars.historicalAuthorData);
|
||||||
|
|
||||||
return changesetLoader;
|
return changesetLoader;
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.loadBroadcastJS = loadBroadcastJS;
|
exports.loadBroadcastJS = loadBroadcastJS;
|
||||||
|
|
||||||
|
return exports;
|
||||||
|
});
|
||||||
|
|
|
@ -26,17 +26,18 @@
|
||||||
// requires: plugins
|
// requires: plugins
|
||||||
// requires: undefined
|
// requires: undefined
|
||||||
|
|
||||||
var Security = require('./security');
|
define(['ep_etherpad-lite/static/js/pluginfw/hooks', 'ep_etherpad-lite/static/js/linestylefilter', 'underscore'], function(hooks, linestylefilterMod, _) {
|
||||||
var hooks = require('ep_etherpad-lite/static/js/pluginfw/hooks');
|
var exports = {};
|
||||||
var _ = require('./underscore');
|
|
||||||
var lineAttributeMarker = require('./linestylefilter').lineAttributeMarker;
|
var Security = require('./security');
|
||||||
var noop = function(){};
|
var lineAttributeMarker = linestylefilterMod.lineAttributeMarker;
|
||||||
|
var noop = function(){};
|
||||||
|
|
||||||
|
|
||||||
var domline = {};
|
var domline = {};
|
||||||
|
|
||||||
domline.addToLineClass = function(lineClass, cls)
|
domline.addToLineClass = function(lineClass, cls)
|
||||||
{
|
{
|
||||||
// an "empty span" at any point can be used to add classes to
|
// an "empty span" at any point can be used to add classes to
|
||||||
// the line, using line:className. otherwise, we ignore
|
// the line, using line:className. otherwise, we ignore
|
||||||
// the span.
|
// the span.
|
||||||
|
@ -49,12 +50,12 @@ domline.addToLineClass = function(lineClass, cls)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return lineClass;
|
return lineClass;
|
||||||
}
|
}
|
||||||
|
|
||||||
// if "document" is falsy we don't create a DOM node, just
|
// if "document" is falsy we don't create a DOM node, just
|
||||||
// an object with innerHTML and className
|
// an object with innerHTML and className
|
||||||
domline.createDomLine = function(nonEmpty, doesWrap, optBrowser, optDocument)
|
domline.createDomLine = function(nonEmpty, doesWrap, optBrowser, optDocument)
|
||||||
{
|
{
|
||||||
var result = {
|
var result = {
|
||||||
node: null,
|
node: null,
|
||||||
appendSpan: noop,
|
appendSpan: noop,
|
||||||
|
@ -254,10 +255,10 @@ domline.createDomLine = function(nonEmpty, doesWrap, optBrowser, optDocument)
|
||||||
return curHTML || '';
|
return curHTML || '';
|
||||||
};
|
};
|
||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
|
|
||||||
domline.processSpaces = function(s, doesWrap)
|
domline.processSpaces = function(s, doesWrap)
|
||||||
{
|
{
|
||||||
if (s.indexOf("<") < 0 && !doesWrap)
|
if (s.indexOf("<") < 0 && !doesWrap)
|
||||||
{
|
{
|
||||||
// short-cut
|
// short-cut
|
||||||
|
@ -316,6 +317,9 @@ domline.processSpaces = function(s, doesWrap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return parts.join('');
|
return parts.join('');
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.domline = domline;
|
exports.domline = domline;
|
||||||
|
|
||||||
|
return exports;
|
||||||
|
});
|
||||||
|
|
|
@ -28,35 +28,36 @@
|
||||||
// requires: plugins
|
// requires: plugins
|
||||||
// requires: undefined
|
// requires: undefined
|
||||||
|
|
||||||
var Changeset = require('./Changeset');
|
define(['ep_etherpad-lite/static/js/pluginfw/hooks', 'underscore'], function (hooks, _) {
|
||||||
var hooks = require('ep_etherpad-lite/static/js/pluginfw/hooks');
|
var exports = {};
|
||||||
var linestylefilter = {};
|
|
||||||
var _ = require('./underscore');
|
|
||||||
var AttributeManager = require('./AttributeManager');
|
|
||||||
|
|
||||||
linestylefilter.ATTRIB_CLASSES = {
|
var Changeset = require('./Changeset');
|
||||||
|
var linestylefilter = {};
|
||||||
|
var AttributeManager = require('./AttributeManager');
|
||||||
|
|
||||||
|
linestylefilter.ATTRIB_CLASSES = {
|
||||||
'bold': 'tag:b',
|
'bold': 'tag:b',
|
||||||
'italic': 'tag:i',
|
'italic': 'tag:i',
|
||||||
'underline': 'tag:u',
|
'underline': 'tag:u',
|
||||||
'strikethrough': 'tag:s'
|
'strikethrough': 'tag:s'
|
||||||
};
|
};
|
||||||
|
|
||||||
var lineAttributeMarker = 'lineAttribMarker';
|
var lineAttributeMarker = 'lineAttribMarker';
|
||||||
exports.lineAttributeMarker = lineAttributeMarker;
|
exports.lineAttributeMarker = lineAttributeMarker;
|
||||||
|
|
||||||
linestylefilter.getAuthorClassName = function(author)
|
linestylefilter.getAuthorClassName = function(author)
|
||||||
{
|
{
|
||||||
return "author-" + author.replace(/[^a-y0-9]/g, function(c)
|
return "author-" + author.replace(/[^a-y0-9]/g, function(c)
|
||||||
{
|
{
|
||||||
if (c == ".") return "-";
|
if (c == ".") return "-";
|
||||||
return 'z' + c.charCodeAt(0) + 'z';
|
return 'z' + c.charCodeAt(0) + 'z';
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
// lineLength is without newline; aline includes newline,
|
// lineLength is without newline; aline includes newline,
|
||||||
// but may be falsy if lineLength == 0
|
// but may be falsy if lineLength == 0
|
||||||
linestylefilter.getLineStyleFilter = function(lineLength, aline, textAndClassFunc, apool)
|
linestylefilter.getLineStyleFilter = function(lineLength, aline, textAndClassFunc, apool)
|
||||||
{
|
{
|
||||||
|
|
||||||
// Plugin Hook to add more Attrib Classes
|
// Plugin Hook to add more Attrib Classes
|
||||||
hooks.aCallAll('aceAttribClasses', linestylefilter.ATTRIB_CLASSES, function(err, ATTRIB_CLASSES){
|
hooks.aCallAll('aceAttribClasses', linestylefilter.ATTRIB_CLASSES, function(err, ATTRIB_CLASSES){
|
||||||
|
@ -184,10 +185,10 @@ linestylefilter.getLineStyleFilter = function(lineLength, aline, textAndClassFun
|
||||||
};
|
};
|
||||||
})();
|
})();
|
||||||
return authorColorFunc;
|
return authorColorFunc;
|
||||||
};
|
};
|
||||||
|
|
||||||
linestylefilter.getAtSignSplitterFilter = function(lineText, textAndClassFunc)
|
linestylefilter.getAtSignSplitterFilter = function(lineText, textAndClassFunc)
|
||||||
{
|
{
|
||||||
var at = /@/g;
|
var at = /@/g;
|
||||||
at.lastIndex = 0;
|
at.lastIndex = 0;
|
||||||
var splitPoints = null;
|
var splitPoints = null;
|
||||||
|
@ -204,10 +205,10 @@ linestylefilter.getAtSignSplitterFilter = function(lineText, textAndClassFunc)
|
||||||
if (!splitPoints) return textAndClassFunc;
|
if (!splitPoints) return textAndClassFunc;
|
||||||
|
|
||||||
return linestylefilter.textAndClassFuncSplitter(textAndClassFunc, splitPoints);
|
return linestylefilter.textAndClassFuncSplitter(textAndClassFunc, splitPoints);
|
||||||
};
|
};
|
||||||
|
|
||||||
linestylefilter.getRegexpFilter = function(regExp, tag)
|
linestylefilter.getRegexpFilter = function(regExp, tag)
|
||||||
{
|
{
|
||||||
return function(lineText, textAndClassFunc)
|
return function(lineText, textAndClassFunc)
|
||||||
{
|
{
|
||||||
regExp.lastIndex = 0;
|
regExp.lastIndex = 0;
|
||||||
|
@ -261,17 +262,17 @@ linestylefilter.getRegexpFilter = function(regExp, tag)
|
||||||
|
|
||||||
return linestylefilter.textAndClassFuncSplitter(handleRegExpMatchsAfterSplit, splitPoints);
|
return linestylefilter.textAndClassFuncSplitter(handleRegExpMatchsAfterSplit, splitPoints);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
linestylefilter.REGEX_WORDCHAR = /[\u0030-\u0039\u0041-\u005A\u0061-\u007A\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF\u0100-\u1FFF\u3040-\u9FFF\uF900-\uFDFF\uFE70-\uFEFE\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFDC]/;
|
linestylefilter.REGEX_WORDCHAR = /[\u0030-\u0039\u0041-\u005A\u0061-\u007A\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF\u0100-\u1FFF\u3040-\u9FFF\uF900-\uFDFF\uFE70-\uFEFE\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFDC]/;
|
||||||
linestylefilter.REGEX_URLCHAR = new RegExp('(' + /[-:@a-zA-Z0-9_.,~%+\/\\?=&#!;()\[\]$]/.source + '|' + linestylefilter.REGEX_WORDCHAR.source + ')');
|
linestylefilter.REGEX_URLCHAR = new RegExp('(' + /[-:@a-zA-Z0-9_.,~%+\/\\?=&#!;()\[\]$]/.source + '|' + linestylefilter.REGEX_WORDCHAR.source + ')');
|
||||||
linestylefilter.REGEX_URL = new RegExp(/(?:(?:https?|s?ftp|ftps|file|nfs):\/\/|mailto:|www\.)/.source + linestylefilter.REGEX_URLCHAR.source + '*(?![:.,;])' + linestylefilter.REGEX_URLCHAR.source, 'g');
|
linestylefilter.REGEX_URL = new RegExp(/(?:(?:https?|s?ftp|ftps|file|nfs):\/\/|mailto:|www\.)/.source + linestylefilter.REGEX_URLCHAR.source + '*(?![:.,;])' + linestylefilter.REGEX_URLCHAR.source, 'g');
|
||||||
linestylefilter.getURLFilter = linestylefilter.getRegexpFilter(
|
linestylefilter.getURLFilter = linestylefilter.getRegexpFilter(
|
||||||
linestylefilter.REGEX_URL, 'url');
|
linestylefilter.REGEX_URL, 'url');
|
||||||
|
|
||||||
linestylefilter.textAndClassFuncSplitter = function(func, splitPointsOpt)
|
linestylefilter.textAndClassFuncSplitter = function(func, splitPointsOpt)
|
||||||
{
|
{
|
||||||
var nextPointIndex = 0;
|
var nextPointIndex = 0;
|
||||||
var idx = 0;
|
var idx = 0;
|
||||||
|
|
||||||
|
@ -316,10 +317,10 @@ linestylefilter.textAndClassFuncSplitter = function(func, splitPointsOpt)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return spanHandler;
|
return spanHandler;
|
||||||
};
|
};
|
||||||
|
|
||||||
linestylefilter.getFilterStack = function(lineText, textAndClassFunc, abrowser)
|
linestylefilter.getFilterStack = function(lineText, textAndClassFunc, abrowser)
|
||||||
{
|
{
|
||||||
var func = linestylefilter.getURLFilter(lineText, textAndClassFunc);
|
var func = linestylefilter.getURLFilter(lineText, textAndClassFunc);
|
||||||
|
|
||||||
var hookFilters = hooks.callAll("aceGetFilterStack", {
|
var hookFilters = hooks.callAll("aceGetFilterStack", {
|
||||||
|
@ -340,11 +341,11 @@ linestylefilter.getFilterStack = function(lineText, textAndClassFunc, abrowser)
|
||||||
lineText, func);
|
lineText, func);
|
||||||
}
|
}
|
||||||
return func;
|
return func;
|
||||||
};
|
};
|
||||||
|
|
||||||
// domLineObj is like that returned by domline.createDomLine
|
// domLineObj is like that returned by domline.createDomLine
|
||||||
linestylefilter.populateDomLine = function(textLine, aline, apool, domLineObj)
|
linestylefilter.populateDomLine = function(textLine, aline, apool, domLineObj)
|
||||||
{
|
{
|
||||||
// remove final newline from text if any
|
// remove final newline from text if any
|
||||||
var text = textLine;
|
var text = textLine;
|
||||||
if (text.slice(-1) == '\n')
|
if (text.slice(-1) == '\n')
|
||||||
|
@ -360,6 +361,9 @@ linestylefilter.populateDomLine = function(textLine, aline, apool, domLineObj)
|
||||||
var func = linestylefilter.getFilterStack(text, textAndClassFunc);
|
var func = linestylefilter.getFilterStack(text, textAndClassFunc);
|
||||||
func = linestylefilter.getLineStyleFilter(text.length, aline, func, apool);
|
func = linestylefilter.getLineStyleFilter(text.length, aline, func, apool);
|
||||||
func(text, '');
|
func(text, '');
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.linestylefilter = linestylefilter;
|
exports.linestylefilter = linestylefilter;
|
||||||
|
|
||||||
|
return exports;
|
||||||
|
});
|
||||||
|
|
|
@ -27,8 +27,9 @@ define([
|
||||||
'ep_etherpad-lite/static/js/rjquery',
|
'ep_etherpad-lite/static/js/rjquery',
|
||||||
'ep_etherpad-lite/static/js/pluginfw/hooks',
|
'ep_etherpad-lite/static/js/pluginfw/hooks',
|
||||||
'ep_etherpad-lite/static/js/pad_utils',
|
'ep_etherpad-lite/static/js/pad_utils',
|
||||||
'ep_etherpad-lite/static/js/broadcast_slider'
|
'ep_etherpad-lite/static/js/broadcast_slider',
|
||||||
], function($, hooks, padUtilsMod, broadcastSliderMod) {
|
'ep_etherpad-lite/static/js/broadcast',
|
||||||
|
], function($, hooks, padUtilsMod, broadcastSliderMod, broadcastMod) {
|
||||||
var exports = {};
|
var exports = {};
|
||||||
|
|
||||||
JSON = window.requireKernel('./json2');
|
JSON = window.requireKernel('./json2');
|
||||||
|
@ -36,6 +37,11 @@ define([
|
||||||
var createCookie = padUtilsMod.createCookie;
|
var createCookie = padUtilsMod.createCookie;
|
||||||
var readCookie = padUtilsMod.readCookie;
|
var readCookie = padUtilsMod.readCookie;
|
||||||
var randomString = padUtilsMod.randomString;
|
var randomString = padUtilsMod.randomString;
|
||||||
|
var broadcastRevisionsMod = require('./broadcast_revisions');
|
||||||
|
var padimpexpMod = require('./pad_impexp');
|
||||||
|
|
||||||
|
//initialize export ui
|
||||||
|
require('./pad_impexp').padimpexp.init();
|
||||||
|
|
||||||
var token, padId, export_links;
|
var token, padId, export_links;
|
||||||
|
|
||||||
|
@ -142,11 +148,11 @@ define([
|
||||||
|
|
||||||
//load all script that doesn't work without the clientVars
|
//load all script that doesn't work without the clientVars
|
||||||
BroadcastSlider = broadcastSliderMod.loadBroadcastSliderJS(fireWhenAllScriptsAreLoaded);
|
BroadcastSlider = broadcastSliderMod.loadBroadcastSliderJS(fireWhenAllScriptsAreLoaded);
|
||||||
require('./broadcast_revisions').loadBroadcastRevisionsJS();
|
broadcastRevisionsMod.loadBroadcastRevisionsJS();
|
||||||
changesetLoader = require('./broadcast').loadBroadcastJS(socket, sendSocketMsg, fireWhenAllScriptsAreLoaded, BroadcastSlider);
|
changesetLoader = broadcastMod.loadBroadcastJS(socket, sendSocketMsg, fireWhenAllScriptsAreLoaded, BroadcastSlider);
|
||||||
|
|
||||||
//initialize export ui
|
//initialize export ui
|
||||||
require('./pad_impexp').padimpexp.init();
|
padimpexpMod.padimpexp.init();
|
||||||
|
|
||||||
//change export urls when the slider moves
|
//change export urls when the slider moves
|
||||||
BroadcastSlider.onSlider(function(revno)
|
BroadcastSlider.onSlider(function(revno)
|
||||||
|
|
|
@ -406,11 +406,9 @@
|
||||||
[
|
[
|
||||||
'ep_etherpad-lite/static/js/rjquery',
|
'ep_etherpad-lite/static/js/rjquery',
|
||||||
'ep_etherpad-lite/static/js/pluginfw/client_plugins',
|
'ep_etherpad-lite/static/js/pluginfw/client_plugins',
|
||||||
'ep_etherpad-lite/static/js/pluginfw/hooks',
|
'ep_etherpad-lite/static/js/pluginfw/hooks'
|
||||||
'ep_etherpad-lite/static/js/pad',
|
], function ($, plugins, hooks) {
|
||||||
'ep_etherpad-lite/static/js/chat',
|
console.log("hooks & plugins modules loaded");
|
||||||
'ep_etherpad-lite/static/js/pad_editbar',
|
|
||||||
], function ($, plugins, hooks, padMod, chatMod, padEditbarMod) {
|
|
||||||
window.$ = $; // Expose jQuery #HACK
|
window.$ = $; // Expose jQuery #HACK
|
||||||
window.jQuery = $;
|
window.jQuery = $;
|
||||||
|
|
||||||
|
@ -423,14 +421,23 @@
|
||||||
plugins.update(function () {
|
plugins.update(function () {
|
||||||
hooks.plugins = plugins;
|
hooks.plugins = plugins;
|
||||||
|
|
||||||
|
console.log("hooks.plugins initialized");
|
||||||
|
|
||||||
// Call documentReady hook
|
// Call documentReady hook
|
||||||
$(function() {
|
$(function() {
|
||||||
hooks.aCallAll('documentReady');
|
hooks.aCallAll('documentReady');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
requirejs(
|
||||||
|
[
|
||||||
|
'ep_etherpad-lite/static/js/pad',
|
||||||
|
'ep_etherpad-lite/static/js/chat',
|
||||||
|
'ep_etherpad-lite/static/js/pad_editbar',
|
||||||
|
], function (padMod, chatMod, padEditbarMod) {
|
||||||
|
console.log("pad loaded");
|
||||||
|
|
||||||
padMod.baseURL = baseURL;
|
padMod.baseURL = baseURL;
|
||||||
padMod.init();
|
padMod.init();
|
||||||
});
|
|
||||||
|
|
||||||
/* TODO: These globals shouldn't exist. */
|
/* TODO: These globals shouldn't exist. */
|
||||||
pad = padMod.pad;
|
pad = padMod.pad;
|
||||||
|
@ -439,6 +446,9 @@
|
||||||
padimpexp = window.requireKernel('ep_etherpad-lite/static/js/pad_impexp').padimpexp;
|
padimpexp = window.requireKernel('ep_etherpad-lite/static/js/pad_impexp').padimpexp;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
);
|
||||||
}());
|
}());
|
||||||
</script>
|
</script>
|
||||||
<% e.end_block(); %>
|
<% e.end_block(); %>
|
||||||
|
|
Loading…
Reference in a new issue