sonarr-repo-only/UI/Episode/Search/Layout.js

69 lines
1.8 KiB
JavaScript
Raw Normal View History

"use strict";
2013-06-10 02:16:48 +00:00
define([
'app',
'Cells/FileSizeCell',
'Cells/QualityCell',
'Release/ApprovalStatusCell',
'Release/DownloadReportCell'
], function () {
NzbDrone.Episode.Search.Layout = Backbone.Marionette.Layout.extend({
template: 'Episode/Search/LayoutTemplate',
regions: {
grid: '#episode-release-grid'
},
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
},
{
name : 'size',
label : 'Size',
sortable: true,
cell : NzbDrone.Cells.FileSizeCell
},
{
2013-06-10 02:16:48 +00:00
name : 'quality',
label : 'Quality',
sortable: true,
2013-06-10 02:16:48 +00:00
cell : NzbDrone.Cells.QualityCell
},
2013-06-10 02:16:48 +00:00
{
name : 'rejections',
label: 'decision',
cell : NzbDrone.Release.ApprovalStatusCell
},
{
name : 'download',
label: '',
cell : NzbDrone.Release.DownloadReportCell
}
],
2013-06-07 00:50:17 +00:00
onShow: function () {
if (!this.isClosed) {
this.grid.show(new Backgrid.Grid(
{
row : Backgrid.Row,
columns : this.columns,
collection: this.collection,
className : 'table table-hover'
}));
}
}
});
});