mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-31 19:02:59 +01:00
Moving the toolbar plugin calls.
This commit is contained in:
parent
988653b8ce
commit
90837437c5
4 changed files with 16 additions and 9 deletions
|
@ -1,5 +1,7 @@
|
||||||
var path = require('path');
|
var path = require('path');
|
||||||
var eejs = require('ep_etherpad-lite/node/eejs');
|
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) {
|
exports.expressCreateServer = function (hook_name, args, cb) {
|
||||||
|
|
||||||
|
@ -26,8 +28,15 @@ exports.expressCreateServer = function (hook_name, args, cb) {
|
||||||
|
|
||||||
//serve pad.html under /p
|
//serve pad.html under /p
|
||||||
args.app.get('/p/:pad', function(req, res, next)
|
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
|
//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
|
* The Toolbar Module creates and renders the toolbars and buttons
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var _ = require("underscore")
|
var _ = require("underscore")
|
||||||
, tagAttributes
|
, tagAttributes
|
||||||
, tag
|
, tag
|
||||||
|
|
|
@ -131,6 +131,9 @@ var padeditbar = (function()
|
||||||
if (this.commands[cmd]) {
|
if (this.commands[cmd]) {
|
||||||
this.commands[cmd](cmd, padeditor.ace);
|
this.commands[cmd](cmd, padeditor.ace);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
console.log("Command doesn't exist", cmd);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(padeditor.ace) padeditor.ace.focus();
|
if(padeditor.ace) padeditor.ace.focus();
|
||||||
},
|
},
|
||||||
|
|
|
@ -2,11 +2,7 @@
|
||||||
var settings = require("ep_etherpad-lite/node/utils/Settings")
|
var settings = require("ep_etherpad-lite/node/utils/Settings")
|
||||||
, hooks = require('ep_etherpad-lite/static/js/pluginfw/hooks')
|
, hooks = require('ep_etherpad-lite/static/js/pluginfw/hooks')
|
||||||
, langs = require("ep_etherpad-lite/node/hooks/i18n").availableLangs
|
, langs = require("ep_etherpad-lite/node/hooks/i18n").availableLangs
|
||||||
, toolbar = require("ep_etherpad-lite/node/utils/toolbar");
|
;
|
||||||
|
|
||||||
hooks.callAll("padInitToolbar", {
|
|
||||||
toolbar: toolbar
|
|
||||||
});
|
|
||||||
%>
|
%>
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<% e.begin_block("htmlHead"); %>
|
<% e.begin_block("htmlHead"); %>
|
||||||
|
|
Loading…
Reference in a new issue