diff options
| author | Jules Laplace <jules@okfoc.us> | 2012-07-18 00:02:21 -0400 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2012-07-18 00:02:21 -0400 |
| commit | c4338d2ae878a167c409e91dea6d1783fc7e30ba (patch) | |
| tree | 1e54fac722ac3153f9180a5a8332f2b19e11c00c /static/js/src/growl.js | |
| parent | d891a7ae1b205716c086363fba17a3249a665deb (diff) | |
put away back
Diffstat (limited to 'static/js/src/growl.js')
| -rw-r--r-- | static/js/src/growl.js | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/static/js/src/growl.js b/static/js/src/growl.js new file mode 100644 index 0000000..4ed84cc --- /dev/null +++ b/static/js/src/growl.js @@ -0,0 +1,23 @@ +// Growl + +function buildGrowlDataAndPopDatShit(msg) { + var nick = escapeHtml(msg.nick); + nick = '<a href="' + RootDomain + nick + ' " style="color:pink">' + nick + '</a>:' + var msg = buildMsgContent(msg.content) + growl(nick, msg) +} + +function growl(user, msg) { + $.gritter.add({title: user, text: msg}); +} + +function handleMsgError(resp) { + var respText = resp.responseText ? resp.responseText.trim() : false; + if (respText == 'MUST_LOGIN') { + alert("Can't send message! Please login."); + } else if (respText) { + alert("Can't send message! " + respText); + } else { + alert("Can't send message!"); + } +}
\ No newline at end of file |
