1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-16 11:37:58 +02:00
Sonarr/UI/Cells/EpisodeStatusCell.js

35 lines
781 B
JavaScript
Raw Normal View History

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