|
|
@ -3,7 +3,7 @@ define(
|
|
|
|
[
|
|
|
|
[
|
|
|
|
'marionette',
|
|
|
|
'marionette',
|
|
|
|
'backgrid',
|
|
|
|
'backgrid',
|
|
|
|
'Release/Collection',
|
|
|
|
'Release/ReleaseCollection',
|
|
|
|
'Cells/IndexerCell',
|
|
|
|
'Cells/IndexerCell',
|
|
|
|
'Cells/EpisodeNumberCell',
|
|
|
|
'Cells/EpisodeNumberCell',
|
|
|
|
'Cells/FileSizeCell',
|
|
|
|
'Cells/FileSizeCell',
|
|
|
@ -12,7 +12,7 @@ define(
|
|
|
|
'Shared/LoadingView'
|
|
|
|
'Shared/LoadingView'
|
|
|
|
], function (Marionette, Backgrid, ReleaseCollection, IndexerCell, EpisodeNumberCell, FileSizeCell, QualityCell, ApprovalStatusCell, LoadingView) {
|
|
|
|
], function (Marionette, Backgrid, ReleaseCollection, IndexerCell, EpisodeNumberCell, FileSizeCell, QualityCell, ApprovalStatusCell, LoadingView) {
|
|
|
|
return Marionette.Layout.extend({
|
|
|
|
return Marionette.Layout.extend({
|
|
|
|
template: 'Release/LayoutTemplate',
|
|
|
|
template: 'Release/ReleaseLayoutTemplate',
|
|
|
|
|
|
|
|
|
|
|
|
regions: {
|
|
|
|
regions: {
|
|
|
|
grid : '#x-grid',
|
|
|
|
grid : '#x-grid',
|
|
|
@ -27,7 +27,6 @@ define(
|
|
|
|
sortable: true,
|
|
|
|
sortable: true,
|
|
|
|
cell : IndexerCell
|
|
|
|
cell : IndexerCell
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
name : 'title',
|
|
|
|
name : 'title',
|
|
|
|
label : 'Title',
|
|
|
|
label : 'Title',
|
|
|
@ -52,7 +51,6 @@ define(
|
|
|
|
sortable: true,
|
|
|
|
sortable: true,
|
|
|
|
cell : QualityCell
|
|
|
|
cell : QualityCell
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
name : 'rejections',
|
|
|
|
name : 'rejections',
|
|
|
|
label: '',
|
|
|
|
label: '',
|
|
|
@ -60,7 +58,17 @@ define(
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
],
|
|
|
|
|
|
|
|
|
|
|
|
showTable: function () {
|
|
|
|
initialize: function () {
|
|
|
|
|
|
|
|
this.collection = new ReleaseCollection();
|
|
|
|
|
|
|
|
this.listenTo(this.collection, 'sync', this._showTable);
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
onRender: function () {
|
|
|
|
|
|
|
|
this.grid.show(new LoadingView());
|
|
|
|
|
|
|
|
this.collection.fetch();
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_showTable: function () {
|
|
|
|
if (!this.isClosed) {
|
|
|
|
if (!this.isClosed) {
|
|
|
|
this.grid.show(new Backgrid.Grid({
|
|
|
|
this.grid.show(new Backgrid.Grid({
|
|
|
|
row : Backgrid.Row,
|
|
|
|
row : Backgrid.Row,
|
|
|
@ -69,23 +77,6 @@ define(
|
|
|
|
className : 'table table-hover'
|
|
|
|
className : 'table table-hover'
|
|
|
|
}));
|
|
|
|
}));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
initialize: function () {
|
|
|
|
|
|
|
|
this.collection = new ReleaseCollection();
|
|
|
|
|
|
|
|
this.fetchPromise = this.collection.fetch();
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
onShow: function () {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var self = this;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.grid.show(new LoadingView());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.fetchPromise.done(function () {
|
|
|
|
|
|
|
|
self.showTable();
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|