2013-06-22 08:24:24 +02:00
|
|
|
'use strict';
|
2013-05-21 02:17:33 +02:00
|
|
|
|
2013-06-25 01:41:59 +02:00
|
|
|
define(
|
|
|
|
[
|
|
|
|
'app',
|
2013-07-24 06:16:52 +02:00
|
|
|
'Cells/NzbDroneCell'
|
|
|
|
], function (App, NzbDroneCell) {
|
2013-06-25 01:41:59 +02:00
|
|
|
return NzbDroneCell.extend({
|
2013-05-21 02:17:33 +02:00
|
|
|
|
2013-06-25 01:41:59 +02:00
|
|
|
className: 'episode-title-cell',
|
2013-05-21 02:17:33 +02:00
|
|
|
|
2013-06-25 01:41:59 +02:00
|
|
|
events: {
|
2013-07-29 01:13:14 +02:00
|
|
|
'click': '_showDetails'
|
2013-06-25 01:41:59 +02:00
|
|
|
},
|
2013-06-09 22:51:32 +02:00
|
|
|
|
2013-06-25 01:41:59 +02:00
|
|
|
render: function () {
|
2013-06-28 20:25:09 +02:00
|
|
|
var title = this.cellValue.get('title');
|
|
|
|
|
|
|
|
if (!title || title === '') {
|
|
|
|
title = 'TBA';
|
|
|
|
}
|
|
|
|
|
|
|
|
this.$el.html(title);
|
2013-06-25 01:41:59 +02:00
|
|
|
return this;
|
2013-07-29 01:13:14 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
_showDetails: function () {
|
|
|
|
App.vent.trigger(App.Commands.ShowEpisodeDetails, {episode: this.cellValue});
|
2013-06-25 01:41:59 +02:00
|
|
|
}
|
|
|
|
});
|
2013-05-21 02:17:33 +02:00
|
|
|
});
|