Hook modules can be in either CommonJS or AMD format, have to be AMD for client side

This commit is contained in:
Egil Moeller 2015-04-11 16:51:01 +02:00
parent 0e5cd65d8d
commit b86aa5d858
6 changed files with 94 additions and 46 deletions

View file

@ -26,9 +26,11 @@ exports.update = function (cb) {
jQuery.getJSON(exports.baseURL + 'pluginfw/plugin-definitions.json', function(data) {
exports.plugins = data.plugins;
exports.parts = data.parts;
exports.hooks = pluginUtils.extractHooks(exports.parts, "client_hooks");
exports.loaded = true;
callback();
pluginUtils.extractHooks(exports.parts, "client_hooks", undefined, function (err, hooks) {
exports.hooks = hooks;
exports.loaded = true;
callback();
});
}).error(function(xhr, s, err){
console.error("Failed to load plugin-definitions: " + err);
callback();