diff options
author | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2009-12-02 13:48:17 +0100 |
---|---|---|
committer | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2009-12-02 13:48:17 +0100 |
commit | 44eb990b475ca835b4720bf0521d4159b21b9508 (patch) | |
tree | 2d2e183605ec5ad76133c4bf6b59d444afd34d56 /war | |
parent | 6aadd1b6f2237511e1b853327136e892ec4ef0c0 (diff) |
Add a button for sending the database as mail to all users.
Diffstat (limited to 'war')
-rw-r--r-- | war/logikorr.js | 15 |
1 files changed, 15 insertions, 0 deletions
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"); } |