2013-06-22 09:24:24 +03:00
|
|
|
'use strict';
|
2013-05-15 04:17:24 +03:00
|
|
|
|
2013-06-15 02:18:37 +03:00
|
|
|
define(['app','backgrid' ], function () {
|
2013-06-09 23:51:32 +03:00
|
|
|
NzbDrone.Cells.EpisodeStatusCell = Backgrid.Cell.extend({
|
2013-05-15 04:17:24 +03:00
|
|
|
|
2013-05-21 00:42:20 +03:00
|
|
|
className: 'episode-status-cell',
|
|
|
|
|
2013-05-15 04:17:24 +03:00
|
|
|
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
|
|
|
}
|
|
|
|
|
2013-05-15 04:17:24 +03:00
|
|
|
return this;
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|