Timestamps

This commit is contained in:
Hexagon 2014-09-26 23:13:37 +02:00
parent 1ad2108e71
commit f491373abe
2 changed files with 6 additions and 5 deletions

View File

@ -47,7 +47,8 @@ define(
var tpl = templates.post[type], var tpl = templates.post[type],
post, post,
data = fandango.merge({}, settings, { data = fandango.merge({}, settings, {
nick: nick nick: nick,
timestamp: new Date().toLocaleTimeString()
}); });
data.text = $.template(text, data); data.text = $.template(text, data);

View File

@ -43,10 +43,10 @@ define({
// along with the current nick, room, mute-status and of course the message ('text'). // along with the current nick, room, mute-status and of course the message ('text').
post: { post: {
motd: '<li><i class="motd">{text}</i></li>', motd: '<li><i class="motd">{text}</i></li>',
info: '<li>INF&gt; <i class="info">{text}</i></li>', info: '<li><i class="timestamp">[{timestamp}] </i>INF&gt; <i class="info">{text}</i></li>',
server: '<li>SRV&gt; <i class="server">{text}</i></li>', server: '<li><i class="timestamp">[{timestamp}] </i>SRV&gt; <i class="server">{text}</i></li>',
error: '<li>ERR&gt; <i class="error">{text}</i></li>', error: '<li><i class="timestamp">[{timestamp}] </i>ERR&gt; <i class="error">{text}</i></li>',
message: '<li><i class="nick">{nick}&gt;</i> <i class="message">{text}</i></li>' message: '<li><i class="timestamp">[{timestamp}] </i><i class="nick">{nick}&gt;</i> <i class="message">{text}</i></li>'
}, },
// All message templates will have access to the properties in the 'settings' module, // All message templates will have access to the properties in the 'settings' module,