2013-05-15 01:17:24 +00:00
|
|
|
"use strict";
|
|
|
|
define(['app'], function () {
|
|
|
|
|
|
|
|
NzbDrone.Episode.Search.Layout = Backbone.Marionette.Layout.extend({
|
2013-06-07 00:17:57 +00:00
|
|
|
template: 'Episode/Search/LayoutTemplate',
|
2013-05-15 01:17:24 +00:00
|
|
|
|
2013-06-07 00:17:57 +00:00
|
|
|
regions: {
|
|
|
|
grid: '#episode-release-grid'
|
|
|
|
},
|
2013-05-15 01:17:24 +00:00
|
|
|
|
2013-06-07 00:17:57 +00:00
|
|
|
columns: [
|
|
|
|
{
|
|
|
|
name : 'age',
|
|
|
|
label : 'Age',
|
|
|
|
sortable: true,
|
|
|
|
cell : Backgrid.IntegerCell
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name : 'size',
|
|
|
|
label : 'Size',
|
|
|
|
sortable: true,
|
|
|
|
cell : Backgrid.IntegerCell
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name : 'title',
|
|
|
|
label : 'Title',
|
|
|
|
sortable: true,
|
|
|
|
cell : Backgrid.StringCell
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name : 'seasonNumber',
|
|
|
|
label: 'season',
|
|
|
|
cell : Backgrid.IntegerCell
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name : 'episodeNumber',
|
|
|
|
label: 'episode',
|
|
|
|
cell : Backgrid.StringCell
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name : 'approved',
|
|
|
|
label: 'Approved',
|
|
|
|
cell : Backgrid.BooleanCell
|
|
|
|
}
|
|
|
|
],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
initialize: function () {
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
onShow :function(){
|
|
|
|
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 01:17:24 +00:00
|
|
|
});
|
|
|
|
|
2013-06-07 00:17:57 +00:00
|
|
|
});
|