Moving the toolbar plugin calls.
parent
988653b8ce
commit
90837437c5
|
@ -1,5 +1,7 @@
|
|||
var path = require('path');
|
||||
var eejs = require('ep_etherpad-lite/node/eejs');
|
||||
var toolbar = require("ep_etherpad-lite/node/utils/toolbar");
|
||||
var hooks = require('ep_etherpad-lite/static/js/pluginfw/hooks');
|
||||
|
||||
exports.expressCreateServer = function (hook_name, args, cb) {
|
||||
|
||||
|
@ -26,8 +28,15 @@ exports.expressCreateServer = function (hook_name, args, cb) {
|
|||
|
||||
//serve pad.html under /p
|
||||
args.app.get('/p/:pad', function(req, res, next)
|
||||
{
|
||||
res.send(eejs.require("ep_etherpad-lite/templates/pad.html", {req: req}));
|
||||
{
|
||||
hooks.callAll("padInitToolbar", {
|
||||
toolbar: toolbar
|
||||
});
|
||||
|
||||
res.send(eejs.require("ep_etherpad-lite/templates/pad.html", {
|
||||
req: req,
|
||||
toolbar: toolbar
|
||||
}));
|
||||
});
|
||||
|
||||
//serve timeslider.html under /p/$padname/timeslider
|
||||
|
@ -52,4 +61,4 @@ exports.expressCreateServer = function (hook_name, args, cb) {
|
|||
});
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
/**
|
||||
* The Toolbar Module creates and renders the toolbars and buttons
|
||||
*/
|
||||
|
||||
var _ = require("underscore")
|
||||
, tagAttributes
|
||||
, tag
|
||||
|
|
|
@ -131,6 +131,9 @@ var padeditbar = (function()
|
|||
if (this.commands[cmd]) {
|
||||
this.commands[cmd](cmd, padeditor.ace);
|
||||
}
|
||||
else {
|
||||
console.log("Command doesn't exist", cmd);
|
||||
}
|
||||
}
|
||||
if(padeditor.ace) padeditor.ace.focus();
|
||||
},
|
||||
|
|
|
@ -2,11 +2,7 @@
|
|||
var settings = require("ep_etherpad-lite/node/utils/Settings")
|
||||
, hooks = require('ep_etherpad-lite/static/js/pluginfw/hooks')
|
||||
, langs = require("ep_etherpad-lite/node/hooks/i18n").availableLangs
|
||||
, toolbar = require("ep_etherpad-lite/node/utils/toolbar");
|
||||
|
||||
hooks.callAll("padInitToolbar", {
|
||||
toolbar: toolbar
|
||||
});
|
||||
;
|
||||
%>
|
||||
<!doctype html>
|
||||
<% e.begin_block("htmlHead"); %>
|
||||
|
|
Loading…
Reference in New Issue