From 3338db9485b1e97818ba67a6008866cbce15fef0 Mon Sep 17 00:00:00 2001 From: Egil Moeller Date: Tue, 5 Jun 2012 13:32:33 +0200 Subject: [PATCH] Bugfixes --- src/static/js/pluginfw/hooks.js | 2 +- src/templates/admin/plugins-info.html | 30 +++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 src/templates/admin/plugins-info.html diff --git a/src/static/js/pluginfw/hooks.js b/src/static/js/pluginfw/hooks.js index 49e46c608..7281cac96 100644 --- a/src/static/js/pluginfw/hooks.js +++ b/src/static/js/pluginfw/hooks.js @@ -102,7 +102,7 @@ exports.aCallAll = function (hook_name, args, cb) { exports.callFirst = function (hook_name, args) { if (!args) args = {}; - if (plugins.hooks[hook_name][0] === undefined) return []; + if (plugins.hooks[hook_name] === undefined) return []; return exports.syncMapFirst(plugins.hooks[hook_name], function (hook) { return hookCallWrapper(hook, hook_name, args); }); diff --git a/src/templates/admin/plugins-info.html b/src/templates/admin/plugins-info.html new file mode 100644 index 000000000..22f87073e --- /dev/null +++ b/src/templates/admin/plugins-info.html @@ -0,0 +1,30 @@ +<% + var plugins = require("ep_etherpad-lite/static/js/pluginfw/plugins"); +%> + + + + Plugin information + + + + +
+

Etherpad Lite

+
+ +

Installed plugins

+
<%= plugins.formatPlugins() %>
+ +

Installed parts

+
<%= plugins.formatParts() %>
+ +

Installed hooks

+

Server side hooks

+
<%= plugins.formatHooks() %>
+ +

Client side hooks

+
<%= plugins.formatHooks("client_hooks") %>
+
+ +