Radarr/UI/Cells/RelativeDateCell.js

24 lines
595 B
JavaScript
Raw Normal View History

2013-06-22 06:24:24 +00:00
'use strict';
define(
[
'Cells/NzbDroneCell',
'moment',
'Shared/FormatHelpers'
], function (NzbDroneCell, Moment, FormatHelpers) {
return NzbDroneCell.extend({
2013-06-10 05:37:41 +00:00
className: 'relative-date-cell',
render: function () {
var date = this.model.get(this.column.get('name'));
if (date) {
2013-08-04 01:27:12 +00:00
this.$el.html("<span title='" + Moment(date).format('LLLL') + "' >" + FormatHelpers.dateHelper(date) + "</span");
}
return this;
}
});
});