ep_email_notifications/client.js
quenenni 330cc427b8 Added global option + malformed email + cleaning
- Added 'panelDisplayLocation' option to choose where to show the subscription form
- Manage malformed email (it crashed EPL)
- Brought back popup form to subscribe (with the new options + unsubscription)
- Popup form is a copy of the form in mysettings menu, so no more 2 html codes in 2 different places
- On unsubscription, only remove the email from "globalAuthor" row if the email is the same.
- Put all css styles in css file
- Some cleaning
2013-03-30 01:34:19 +01:00

21 lines
921 B
JavaScript

var eejs = require("ep_etherpad-lite/node/eejs");
var settings = require('../../src/node/utils/Settings');
exports.eejsBlock_scripts = function (hook_name, args, cb) {
args.content = args.content + eejs.require("ep_email_notifications/templates/scripts.html", {}, module);
return cb();
};
exports.eejsBlock_mySettings = function (hook_name, args, cb) {
args.content = args.content + eejs.require('ep_email_notifications/templates/email_notifications_settings.ejs');
return cb();
};
exports.eejsBlock_styles = function (hook_name, args, cb) {
args.content = args.content + '<link href="../static/plugins/ep_email_notifications/static/css/email_notifications.css" rel="stylesheet">';
};
exports.clientVars = function(hook, context, callback) {
// return the setting to the clientVars, sending the value
return callback({ "panelDisplayLocation": settings.ep_email_notifications.panelDisplayLocation });
};