2013-06-22 06:24:24 +00:00
|
|
|
'use strict';
|
2013-06-10 02:16:48 +00:00
|
|
|
define([
|
|
|
|
'app',
|
|
|
|
'Cells/FileSizeCell',
|
|
|
|
'Cells/QualityCell',
|
|
|
|
'Release/ApprovalStatusCell',
|
|
|
|
'Release/DownloadReportCell'
|
|
|
|
], function () {
|
2013-05-15 01:17:24 +00:00
|
|
|
|
|
|
|
NzbDrone.Episode.Search.Layout = Backbone.Marionette.Layout.extend({
|
2013-06-07 00:17:57 +00:00
|
|
|
template: 'Episode/Search/LayoutTemplate',
|
2013-05-15 01:17:24 +00:00
|
|
|
|
2013-06-07 00:17:57 +00:00
|
|
|
regions: {
|
|
|
|
grid: '#episode-release-grid'
|
|
|
|
},
|
2013-05-15 01:17:24 +00:00
|
|
|
|
2013-06-07 00:17:57 +00:00
|
|
|
columns: [
|
|
|
|
{
|
|
|
|
name : 'age',
|
|
|
|
label : 'Age',
|
|
|
|
sortable: true,
|
|
|
|
cell : Backgrid.IntegerCell
|
|
|
|
},
|
2013-06-10 02:16:48 +00:00
|
|
|
{
|
|
|
|
name : 'title',
|
|
|
|
label : 'Title',
|
|
|
|
sortable: true,
|
|
|
|
cell : Backgrid.StringCell
|
|
|
|
},
|
2013-06-07 00:17:57 +00:00
|
|
|
{
|
|
|
|
name : 'size',
|
|
|
|
label : 'Size',
|
|
|
|
sortable: true,
|
2013-06-09 20:51:32 +00:00
|
|
|
cell : NzbDrone.Cells.FileSizeCell
|
2013-06-07 00:17:57 +00:00
|
|
|
},
|
|
|
|
{
|
2013-06-10 02:16:48 +00:00
|
|
|
name : 'quality',
|
|
|
|
label : 'Quality',
|
2013-06-07 00:17:57 +00:00
|
|
|
sortable: true,
|
2013-06-10 02:16:48 +00:00
|
|
|
cell : NzbDrone.Cells.QualityCell
|
2013-06-07 00:17:57 +00:00
|
|
|
},
|
2013-06-10 02:16:48 +00:00
|
|
|
|
2013-06-07 00:17:57 +00:00
|
|
|
{
|
2013-06-08 19:14:52 +00:00
|
|
|
name : 'rejections',
|
|
|
|
label: 'decision',
|
2013-06-09 20:51:32 +00:00
|
|
|
cell : NzbDrone.Release.ApprovalStatusCell
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name : 'download',
|
|
|
|
label: '',
|
|
|
|
cell : NzbDrone.Release.DownloadReportCell
|
2013-06-07 00:17:57 +00:00
|
|
|
}
|
|
|
|
],
|
|
|
|
|
2013-06-07 00:50:17 +00:00
|
|
|
onShow: function () {
|
2013-06-07 00:17:57 +00:00
|
|
|
if (!this.isClosed) {
|
|
|
|
this.grid.show(new Backgrid.Grid(
|
|
|
|
{
|
|
|
|
row : Backgrid.Row,
|
|
|
|
columns : this.columns,
|
|
|
|
collection: this.collection,
|
|
|
|
className : 'table table-hover'
|
|
|
|
}));
|
|
|
|
}
|
|
|
|
}
|
2013-05-15 01:17:24 +00:00
|
|
|
});
|
|
|
|
|
2013-06-07 00:17:57 +00:00
|
|
|
});
|