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