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
|
src/static/js/jquery.js
|
||||||
npm-debug.log
|
npm-debug.log
|
||||||
*.DS_Store
|
*.DS_Store
|
||||||
|
.ep_initialized
|
||||||
|
|
|
@ -98,6 +98,28 @@ if (exports.isClient) {
|
||||||
};
|
};
|
||||||
} else {
|
} 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.update = function (cb) {
|
||||||
exports.getPackages(function (er, packages) {
|
exports.getPackages(function (er, packages) {
|
||||||
var parts = [];
|
var parts = [];
|
||||||
|
@ -109,11 +131,12 @@ exports.update = function (cb) {
|
||||||
exports.loadPlugin(packages, plugin_name, plugins, parts, cb);
|
exports.loadPlugin(packages, plugin_name, plugins, parts, cb);
|
||||||
},
|
},
|
||||||
function (err) {
|
function (err) {
|
||||||
|
if (err) cb(err);
|
||||||
exports.plugins = plugins;
|
exports.plugins = plugins;
|
||||||
exports.parts = exports.sortParts(parts);
|
exports.parts = exports.sortParts(parts);
|
||||||
exports.hooks = exports.extractHooks(exports.parts, "hooks");
|
exports.hooks = exports.extractHooks(exports.parts, "hooks");
|
||||||
exports.loaded = true;
|
exports.loaded = true;
|
||||||
cb(err);
|
exports.callInit(cb);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
|
@ -130,6 +130,7 @@
|
||||||
|
|
||||||
<script src="static/custom/index.js"></script>
|
<script src="static/custom/index.js"></script>
|
||||||
<script>
|
<script>
|
||||||
|
document.domain = document.domain;
|
||||||
function go2Name()
|
function go2Name()
|
||||||
{
|
{
|
||||||
var padname = document.getElementById("padname").value;
|
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" src="../javascripts/lib/ep_etherpad-lite/static/js/pad.js?callback=require.define"></script>
|
||||||
<% } %>
|
<% } %>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
document.domain = document.domain;
|
||||||
var clientVars = {};
|
var clientVars = {};
|
||||||
(function () {
|
(function () {
|
||||||
<% if (settings.minify) { %>
|
<% 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="../../../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" src="../../../static/custom/timeslider.js"></script>
|
||||||
<script type="text/javascript" >
|
<script type="text/javascript" >
|
||||||
|
document.domain = document.domain;
|
||||||
var clientVars = {};
|
var clientVars = {};
|
||||||
(function () {
|
(function () {
|
||||||
require.setRootURI("../../../javascripts/src");
|
require.setRootURI("../../../javascripts/src");
|
||||||
|
|
Loading…
Reference in New Issue