Integrated hooks into templates and provided a blokc/hook for the left and right editbar menu

This commit is contained in:
Egil Moeller 2012-03-13 20:32:56 +01:00
parent 05c2e0fde5
commit a5366a0a16
5 changed files with 83 additions and 57 deletions

View file

@ -25,7 +25,8 @@
"hooks": {
"somehookname": "ep_fintest/otherpart:somehook",
"morehook": "ep_fintest/otherpart:morehook",
"expressCreateServer": "ep_fintest/otherpart:expressServer"
"expressCreateServer": "ep_fintest/otherpart:expressServer",
"eejsBlock_editbarMenuLeft": "ep_fintest/otherpart:eejsBlock_editbarMenuLeft"
},
"client_hooks": {
"somehookname": "ep_fintest/static/js/test:bar"

View file

@ -14,3 +14,12 @@ exports.expressServer = function (hook_name, args, cb) {
res.send("<em>Abra cadabra</em>");
});
}
exports.eejsBlock_editbarMenuLeft = function (hook_name, args, cb) {
args.content = args.content + '\
<li id="testButton" onClick="window.pad&amp;&amp;pad.editbarClick(\'clearauthorship\');return false;">\
<a class="buttonicon buttonicon-test" title="Test test test"></a>\
</li>\
';
return cb();
}