mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
rjs -> webpack
This commit is contained in:
@@ -1,82 +1,65 @@
|
||||
'use strict';
|
||||
define(
|
||||
[
|
||||
'marionette',
|
||||
'backgrid',
|
||||
'Release/ReleaseCollection',
|
||||
'Cells/IndexerCell',
|
||||
'Cells/EpisodeNumberCell',
|
||||
'Cells/FileSizeCell',
|
||||
'Cells/QualityCell',
|
||||
'Cells/ApprovalStatusCell',
|
||||
'Shared/LoadingView'
|
||||
], function (Marionette, Backgrid, ReleaseCollection, IndexerCell, EpisodeNumberCell, FileSizeCell, QualityCell, ApprovalStatusCell, LoadingView) {
|
||||
return Marionette.Layout.extend({
|
||||
template: 'Release/ReleaseLayoutTemplate',
|
||||
var Marionette = require('marionette');
|
||||
var Backgrid = require('backgrid');
|
||||
var ReleaseCollection = require('./ReleaseCollection');
|
||||
var IndexerCell = require('../Cells/IndexerCell');
|
||||
var EpisodeNumberCell = require('../Cells/EpisodeNumberCell');
|
||||
var FileSizeCell = require('../Cells/FileSizeCell');
|
||||
var QualityCell = require('../Cells/QualityCell');
|
||||
var ApprovalStatusCell = require('../Cells/ApprovalStatusCell');
|
||||
var LoadingView = require('../Shared/LoadingView');
|
||||
|
||||
regions: {
|
||||
grid : '#x-grid',
|
||||
toolbar: '#x-toolbar'
|
||||
},
|
||||
|
||||
columns:
|
||||
[
|
||||
{
|
||||
name : 'indexer',
|
||||
label : 'Indexer',
|
||||
sortable: true,
|
||||
cell : IndexerCell
|
||||
},
|
||||
{
|
||||
name : 'title',
|
||||
label : 'Title',
|
||||
sortable: true,
|
||||
cell : Backgrid.StringCell
|
||||
},
|
||||
{
|
||||
name : 'episodeNumbers',
|
||||
episodes: 'episodeNumbers',
|
||||
label : 'season',
|
||||
cell : EpisodeNumberCell
|
||||
},
|
||||
{
|
||||
name : 'size',
|
||||
label : 'Size',
|
||||
sortable: true,
|
||||
cell : FileSizeCell
|
||||
},
|
||||
{
|
||||
name : 'quality',
|
||||
label : 'Quality',
|
||||
sortable: true,
|
||||
cell : QualityCell
|
||||
},
|
||||
{
|
||||
name : 'rejections',
|
||||
label: '',
|
||||
cell : ApprovalStatusCell
|
||||
}
|
||||
],
|
||||
|
||||
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) {
|
||||
this.grid.show(new Backgrid.Grid({
|
||||
row : Backgrid.Row,
|
||||
columns : this.columns,
|
||||
collection: this.collection,
|
||||
className : 'table table-hover'
|
||||
}));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
module.exports = Marionette.Layout.extend({
|
||||
template : 'Release/ReleaseLayoutTemplate',
|
||||
regions : {
|
||||
grid : '#x-grid',
|
||||
toolbar : '#x-toolbar'
|
||||
},
|
||||
columns : [{
|
||||
name : 'indexer',
|
||||
label : 'Indexer',
|
||||
sortable : true,
|
||||
cell : IndexerCell
|
||||
}, {
|
||||
name : 'title',
|
||||
label : 'Title',
|
||||
sortable : true,
|
||||
cell : Backgrid.StringCell
|
||||
}, {
|
||||
name : 'episodeNumbers',
|
||||
episodes : 'episodeNumbers',
|
||||
label : 'season',
|
||||
cell : EpisodeNumberCell
|
||||
}, {
|
||||
name : 'size',
|
||||
label : 'Size',
|
||||
sortable : true,
|
||||
cell : FileSizeCell
|
||||
}, {
|
||||
name : 'quality',
|
||||
label : 'Quality',
|
||||
sortable : true,
|
||||
cell : QualityCell
|
||||
}, {
|
||||
name : 'rejections',
|
||||
label : '',
|
||||
cell : ApprovalStatusCell
|
||||
}],
|
||||
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) {
|
||||
this.grid.show(new Backgrid.Grid({
|
||||
row : Backgrid.Row,
|
||||
columns : this.columns,
|
||||
collection : this.collection,
|
||||
className : 'table table-hover'
|
||||
}));
|
||||
}
|
||||
}
|
||||
});
|
Reference in New Issue
Block a user