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