1
0
mirror of https://github.com/moparisthebest/mail synced 2024-08-13 16:43:47 -04:00
mail/src/js/view/messagelistitem-view.js

24 lines
690 B
JavaScript
Raw Normal View History

2013-03-13 11:58:46 -04:00
'use strict';
app.view.MessageListItemView = Backbone.View.extend({
tagName:"li",
initialize:function () {
this.template = _.template(app.util.tpl.get('messagelistitem'));
},
render:function (eventName) {
var params = this.model.toJSON();
params.account = this.options.account;
params.folder = this.options.folder;
params.id = encodeURIComponent(params.id);
var util = new app.crypto.Util(window, null);
var date = util.parseDate(params.sentDate);
params.displayDate = date.getDate() + '.' + (date.getMonth() + 1) + '. ' + date.getHours() + ':' + date.getMinutes();
2013-03-13 11:58:46 -04:00
$(this.el).html(this.template(params));
return this;
}
});