Radarr/UI/Cells/EpisodeTitleCell.js

34 lines
822 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 () {
2013-08-21 21:47:39 +00:00
var hideSeriesLink = this.column.get('hideSeriesLink');
App.vent.trigger(App.Commands.ShowEpisodeDetails, {episode: this.cellValue, hideSeriesLink: hideSeriesLink });
}
});
});