Radarr/UI/Cells/EpisodeTitleCell.js

32 lines
716 B
JavaScript
Raw Normal View History

2013-06-22 06:24:24 +00:00
'use strict';
define(
[
'app',
'Cells/NzbDroneCell'
], function (App, NzbDroneCell) {
return NzbDroneCell.extend({
className: 'episode-title-cell',
events: {
2013-07-28 23:13:14 +00:00
'click': '_showDetails'
},
render: function () {
2013-06-28 18:25:09 +00:00
var title = this.cellValue.get('title');
if (!title || title === '') {
title = 'TBA';
}
this.$el.html(title);
return this;
2013-07-28 23:13:14 +00:00
},
_showDetails: function () {
App.vent.trigger(App.Commands.ShowEpisodeDetails, {episode: this.cellValue});
}
});
});