From 44eb990b475ca835b4720bf0521d4159b21b9508 Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Wed, 2 Dec 2009 13:48:17 +0100 Subject: Add a button for sending the database as mail to all users. --- war/logikorr.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'war') diff --git a/war/logikorr.js b/war/logikorr.js index 8ed6706..2e6158f 100644 --- a/war/logikorr.js +++ b/war/logikorr.js @@ -14,6 +14,21 @@ YUI().use('node', 'node-base', 'io-base', 'io-form', 'io-queue', 'json', functio }); } + function registerSendMailAction() { + var button = Y.one("#send-mail"); + button.on("click", function(e) { + Y.io("send-mail", + { 'on': { 'complete': function(id, o, args) { + Y.log("E-Mail verschickt: " + o.responseText); + if (o.responseText == "\"OK\"") { + Y.one("#mail-sent-label").set("innerText", "E-Mail verschickt."); + } else { + Y.one("#mail-sent-label").set("innerText", "Fehler: " + o.responseText); + } + } } }); + }); + } + function markAsChanged(input) { input.setAttribute("style", "background-color: #faa"); } -- cgit v1.2.3