1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-10-31 16:02:29 +01:00
Sonarr/UI/Cells/EpisodeStatusCell.js

35 lines
781 B
JavaScript
Raw Normal View History

"use strict";
define(['app','backgrid' ], function () {
NzbDrone.Cells.EpisodeStatusCell = Backgrid.Cell.extend({
2013-05-20 23:42:20 +02:00
className: 'episode-status-cell',
render: function () {
this.$el.empty();
2013-05-20 23:05:48 +02:00
if (this.model) {
var icon;
if (this.model.get('episodeFile')) {
icon = 'icon-ok';
}
2013-05-20 23:06:01 +02:00
else {
if (this.model.get('hasAired')) {
icon = 'icon-warning-sign';
}
else {
icon = 'icon-time';
}
}
2013-05-20 23:05:48 +02:00
this.$el.html('<i class="{0}"/>'.format(icon));
}
return this;
}
});
});