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