2013-05-15 04:17:24 +03:00
|
|
|
"use strict";
|
2013-06-09 23:51:32 +03:00
|
|
|
define(['app', 'Cells/FileSizeCell', 'Release/ApprovalStatusCell', 'Release/DownloadReportCell' ], function () {
|
2013-05-15 04:17:24 +03:00
|
|
|
|
|
|
|
NzbDrone.Episode.Search.Layout = Backbone.Marionette.Layout.extend({
|
2013-06-07 03:17:57 +03:00
|
|
|
template: 'Episode/Search/LayoutTemplate',
|
2013-05-15 04:17:24 +03:00
|
|
|
|
2013-06-07 03:17:57 +03:00
|
|
|
regions: {
|
|
|
|
grid: '#episode-release-grid'
|
|
|
|
},
|
2013-05-15 04:17:24 +03:00
|
|
|
|
2013-06-07 03:17:57 +03:00
|
|
|
columns: [
|
|
|
|
{
|
|
|
|
name : 'age',
|
|
|
|
label : 'Age',
|
|
|
|
sortable: true,
|
|
|
|
cell : Backgrid.IntegerCell
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name : 'size',
|
|
|
|
label : 'Size',
|
|
|
|
sortable: true,
|
2013-06-09 23:51:32 +03:00
|
|
|
cell : NzbDrone.Cells.FileSizeCell
|
2013-06-07 03:17:57 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name : 'title',
|
|
|
|
label : 'Title',
|
|
|
|
sortable: true,
|
|
|
|
cell : Backgrid.StringCell
|
|
|
|
},
|
|
|
|
{
|
2013-06-08 22:14:52 +03:00
|
|
|
name : 'rejections',
|
|
|
|
label: 'decision',
|
2013-06-09 23:51:32 +03:00
|
|
|
cell : NzbDrone.Release.ApprovalStatusCell
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name : 'download',
|
|
|
|
label: '',
|
|
|
|
cell : NzbDrone.Release.DownloadReportCell
|
2013-06-07 03:17:57 +03:00
|
|
|
}
|
|
|
|
],
|
|
|
|
|
2013-06-07 03:50:17 +03:00
|
|
|
onShow: function () {
|
2013-06-07 03:17:57 +03: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 04:17:24 +03:00
|
|
|
});
|
|
|
|
|
2013-06-07 03:17:57 +03:00
|
|
|
});
|