Merge pull request #601 from redhog/master
Bugfix for document.domain, and added initialization hook
This commit is contained in:
commit
5b87a2b1bb
|
@ -11,3 +11,4 @@ bin/convertSettings.json
|
|||
src/static/js/jquery.js
|
||||
npm-debug.log
|
||||
*.DS_Store
|
||||
.ep_initialized
|
||||
|
|
|
@ -98,6 +98,28 @@ if (exports.isClient) {
|
|||
};
|
||||
} else {
|
||||
|
||||
exports.callInit = function (cb) {
|
||||
var hooks = require("./hooks");
|
||||
async.map(
|
||||
Object.keys(exports.plugins),
|
||||
function (plugin_name, cb) {
|
||||
var plugin = exports.plugins[plugin_name];
|
||||
fs.stat(path.normalize(path.join(plugin.package.path, ".ep_initialized")), function (err, stats) {
|
||||
if (err) {
|
||||
async.waterfall([
|
||||
function (cb) { fs.writeFile(path.normalize(path.join(plugin.package.path, ".ep_initialized")), 'done', cb); },
|
||||
function (cb) { hooks.aCallAll("init_" + plugin_name, {}, cb); },
|
||||
cb,
|
||||
]);
|
||||
} else {
|
||||
cb();
|
||||
}
|
||||
});
|
||||
},
|
||||
function () { cb(); }
|
||||
);
|
||||
}
|
||||
|
||||
exports.update = function (cb) {
|
||||
exports.getPackages(function (er, packages) {
|
||||
var parts = [];
|
||||
|
@ -109,11 +131,12 @@ exports.update = function (cb) {
|
|||
exports.loadPlugin(packages, plugin_name, plugins, parts, cb);
|
||||
},
|
||||
function (err) {
|
||||
exports.plugins = plugins;
|
||||
if (err) cb(err);
|
||||
exports.plugins = plugins;
|
||||
exports.parts = exports.sortParts(parts);
|
||||
exports.hooks = exports.extractHooks(exports.parts, "hooks");
|
||||
exports.loaded = true;
|
||||
cb(err);
|
||||
exports.loaded = true;
|
||||
exports.callInit(cb);
|
||||
}
|
||||
);
|
||||
});
|
||||
|
|
|
@ -130,6 +130,7 @@
|
|||
|
||||
<script src="static/custom/index.js"></script>
|
||||
<script>
|
||||
document.domain = document.domain;
|
||||
function go2Name()
|
||||
{
|
||||
var padname = document.getElementById("padname").value;
|
||||
|
|
|
@ -280,6 +280,7 @@
|
|||
<script type="text/javascript" src="../javascripts/lib/ep_etherpad-lite/static/js/pad.js?callback=require.define"></script>
|
||||
<% } %>
|
||||
<script type="text/javascript">
|
||||
document.domain = document.domain;
|
||||
var clientVars = {};
|
||||
(function () {
|
||||
<% if (settings.minify) { %>
|
||||
|
|
|
@ -203,6 +203,7 @@
|
|||
<script type="text/javascript" src="../../../javascripts/lib/ep_etherpad-lite/static/js/timeslider.js?callback=require.define"></script>
|
||||
<script type="text/javascript" src="../../../static/custom/timeslider.js"></script>
|
||||
<script type="text/javascript" >
|
||||
document.domain = document.domain;
|
||||
var clientVars = {};
|
||||
(function () {
|
||||
require.setRootURI("../../../javascripts/src");
|
||||
|
|
Loading…
Reference in New Issue