Change time render to be client-side and formatted.

This changes the time render to be done on the client-side and
therefore take advantage of knowing the client’s timezone, along with
being formatted in a more human-parseable way.
This commit is contained in:
Brock Whittaker
2017-02-23 17:30:47 -08:00
committed by Tim Abbott
parent 434317b4cc
commit e504eaaa68
3 changed files with 42 additions and 1 deletions

View File

@@ -11,6 +11,10 @@ exports.set_up_attachments = function () {
var attachment_list = $('#attachments_list');
_.each(page_params.attachments, function (attachment) {
_.each(attachment.messages, function (o) {
o.name = timerender.absolute_time(o.name);
});
var li = templates.render('attachment-item', {attachment: attachment});
attachment_list.append(li);
});