2013-06-29 00:35:21 +00:00
|
|
|
'use strict';
|
|
|
|
define(
|
|
|
|
[
|
|
|
|
'marionette',
|
|
|
|
'backgrid',
|
|
|
|
'Cells/FileSizeCell',
|
|
|
|
'Cells/QualityCell',
|
2013-07-03 00:44:22 +00:00
|
|
|
'Cells/ApprovalStatusCell',
|
2013-06-29 00:35:21 +00:00
|
|
|
'Release/DownloadReportCell'
|
|
|
|
|
|
|
|
], function (Marionette, Backgrid, FileSizeCell, QualityCell, ApprovalStatusCell, DownloadReportCell) {
|
|
|
|
|
|
|
|
return Marionette.Layout.extend({
|
|
|
|
template: 'Episode/Search/ManualLayoutTemplate',
|
|
|
|
|
|
|
|
regions: {
|
|
|
|
grid: '#episode-release-grid'
|
|
|
|
},
|
|
|
|
|
|
|
|
columns:
|
|
|
|
[
|
|
|
|
{
|
|
|
|
name : 'age',
|
|
|
|
label : 'Age',
|
|
|
|
sortable: true,
|
|
|
|
cell : Backgrid.IntegerCell
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name : 'title',
|
|
|
|
label : 'Title',
|
|
|
|
sortable: true,
|
2013-09-01 18:30:54 +00:00
|
|
|
cell : Backgrid.StringCell.extend({ className: 'nzb-title-cell' })
|
2013-06-29 00:35:21 +00:00
|
|
|
},
|
2013-08-01 23:34:36 +00:00
|
|
|
{
|
|
|
|
name : 'indexer',
|
|
|
|
label : 'Indexer',
|
|
|
|
sortable: true,
|
|
|
|
cell : Backgrid.StringCell
|
|
|
|
},
|
2013-06-29 00:35:21 +00:00
|
|
|
{
|
|
|
|
name : 'size',
|
|
|
|
label : 'Size',
|
|
|
|
sortable: true,
|
|
|
|
cell : FileSizeCell
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name : 'quality',
|
|
|
|
label : 'Quality',
|
|
|
|
sortable: true,
|
|
|
|
cell : QualityCell
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
name : 'rejections',
|
2013-07-03 00:44:22 +00:00
|
|
|
label: '',
|
2013-06-29 00:35:21 +00:00
|
|
|
cell : ApprovalStatusCell
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name : 'download',
|
|
|
|
label: '',
|
|
|
|
cell : DownloadReportCell
|
|
|
|
}
|
|
|
|
],
|
|
|
|
|
|
|
|
onShow: function () {
|
|
|
|
if (!this.isClosed) {
|
|
|
|
this.grid.show(new Backgrid.Grid({
|
|
|
|
row : Backgrid.Row,
|
|
|
|
columns : this.columns,
|
|
|
|
collection: this.collection,
|
|
|
|
className : 'table table-hover'
|
|
|
|
}));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|