1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-11-01 00:12:30 +01:00
Sonarr/UI/Cells/EpisodeTitleCell.js
2013-06-28 15:13:10 -07:00

34 lines
778 B
JavaScript

'use strict';
define(
[
'app',
'Cells/NzbDroneCell',
'Episode/Layout'
], function (App, NzbDroneCell, EpisodeLayout) {
return NzbDroneCell.extend({
className: 'episode-title-cell',
events: {
'click': 'showDetails'
},
showDetails: function () {
var view = new EpisodeLayout({ model: this.cellValue });
App.modalRegion.show(view);
},
render: function () {
var title = this.cellValue.get('title');
if (!title || title === '') {
title = 'TBA';
}
this.$el.html(title);
return this;
}
});
});