mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-14 17:13:49 -07:00
UI Cleanup - Updated Activity subtree.
This commit is contained in:
parent
b308f06af3
commit
b556eda4a0
25 changed files with 659 additions and 510 deletions
|
@ -1,116 +1,99 @@
|
|||
'use strict';
|
||||
define(
|
||||
[
|
||||
'marionette',
|
||||
'backgrid',
|
||||
'Activity/Queue/QueueCollection',
|
||||
'Cells/SeriesTitleCell',
|
||||
'Cells/EpisodeNumberCell',
|
||||
'Cells/EpisodeTitleCell',
|
||||
'Cells/QualityCell',
|
||||
'Activity/Queue/QueueStatusCell',
|
||||
'Activity/Queue/QueueActionsCell',
|
||||
'Activity/Queue/TimeleftCell',
|
||||
'Activity/Queue/ProgressCell',
|
||||
'Release/ProtocolCell',
|
||||
'Shared/Grid/Pager'
|
||||
], function (Marionette,
|
||||
Backgrid,
|
||||
QueueCollection,
|
||||
SeriesTitleCell,
|
||||
EpisodeNumberCell,
|
||||
EpisodeTitleCell,
|
||||
QualityCell,
|
||||
QueueStatusCell,
|
||||
QueueActionsCell,
|
||||
TimeleftCell,
|
||||
ProgressCell,
|
||||
ProtocolCell,
|
||||
GridPager) {
|
||||
return Marionette.Layout.extend({
|
||||
template: 'Activity/Queue/QueueLayoutTemplate',
|
||||
var Marionette = require('marionette');
|
||||
var Backgrid = require('backgrid');
|
||||
var QueueCollection = require('./QueueCollection');
|
||||
var SeriesTitleCell = require('../../Cells/SeriesTitleCell');
|
||||
var EpisodeNumberCell = require('../../Cells/EpisodeNumberCell');
|
||||
var EpisodeTitleCell = require('../../Cells/EpisodeTitleCell');
|
||||
var QualityCell = require('../../Cells/QualityCell');
|
||||
var QueueStatusCell = require('./QueueStatusCell');
|
||||
var QueueActionsCell = require('./QueueActionsCell');
|
||||
var TimeleftCell = require('./TimeleftCell');
|
||||
var ProgressCell = require('./ProgressCell');
|
||||
var ProtocolCell = require('../../Release/ProtocolCell');
|
||||
var GridPager = require('../../Shared/Grid/Pager');
|
||||
|
||||
regions: {
|
||||
table: '#x-queue',
|
||||
pager: '#x-queue-pager'
|
||||
},
|
||||
module.exports = Marionette.Layout.extend({
|
||||
template : 'Activity/Queue/QueueLayoutTemplate',
|
||||
|
||||
columns:
|
||||
[
|
||||
{
|
||||
name : 'status',
|
||||
label : '',
|
||||
cell : QueueStatusCell,
|
||||
cellValue : 'this'
|
||||
},
|
||||
{
|
||||
name : 'series',
|
||||
label : 'Series',
|
||||
cell : SeriesTitleCell,
|
||||
sortable : false
|
||||
},
|
||||
{
|
||||
name : 'episode',
|
||||
label : 'Episode',
|
||||
cell : EpisodeNumberCell,
|
||||
sortable : false
|
||||
},
|
||||
{
|
||||
name : 'episode',
|
||||
label : 'Episode Title',
|
||||
cell : EpisodeTitleCell,
|
||||
sortable : false
|
||||
},
|
||||
{
|
||||
name : 'quality',
|
||||
label : 'Quality',
|
||||
cell : QualityCell,
|
||||
sortable : false
|
||||
},
|
||||
{
|
||||
name : 'protocol',
|
||||
label : 'Protocol',
|
||||
cell : ProtocolCell
|
||||
},
|
||||
{
|
||||
name : 'timeleft',
|
||||
label : 'Timeleft',
|
||||
cell : TimeleftCell,
|
||||
cellValue : 'this'
|
||||
},
|
||||
{
|
||||
name : 'episode',
|
||||
label : 'Progress',
|
||||
cell : ProgressCell,
|
||||
cellValue : 'this'
|
||||
},
|
||||
{
|
||||
name : 'status',
|
||||
label : '',
|
||||
cell : QueueActionsCell,
|
||||
cellValue : 'this'
|
||||
}
|
||||
],
|
||||
regions : {
|
||||
table : '#x-queue',
|
||||
pager : '#x-queue-pager'
|
||||
},
|
||||
|
||||
initialize: function () {
|
||||
this.listenTo(QueueCollection, 'sync', this._showTable);
|
||||
},
|
||||
columns : [
|
||||
{
|
||||
name : 'status',
|
||||
label : '',
|
||||
cell : QueueStatusCell,
|
||||
cellValue : 'this'
|
||||
},
|
||||
{
|
||||
name : 'series',
|
||||
label : 'Series',
|
||||
cell : SeriesTitleCell,
|
||||
sortable : false
|
||||
},
|
||||
{
|
||||
name : 'episode',
|
||||
label : 'Episode',
|
||||
cell : EpisodeNumberCell,
|
||||
sortable : false
|
||||
},
|
||||
{
|
||||
name : 'episode',
|
||||
label : 'Episode Title',
|
||||
cell : EpisodeTitleCell,
|
||||
sortable : false
|
||||
},
|
||||
{
|
||||
name : 'quality',
|
||||
label : 'Quality',
|
||||
cell : QualityCell,
|
||||
sortable : false
|
||||
},
|
||||
{
|
||||
name : 'protocol',
|
||||
label : 'Protocol',
|
||||
cell : ProtocolCell
|
||||
},
|
||||
{
|
||||
name : 'timeleft',
|
||||
label : 'Timeleft',
|
||||
cell : TimeleftCell,
|
||||
cellValue : 'this'
|
||||
},
|
||||
{
|
||||
name : 'episode',
|
||||
label : 'Progress',
|
||||
cell : ProgressCell,
|
||||
cellValue : 'this'
|
||||
},
|
||||
{
|
||||
name : 'status',
|
||||
label : '',
|
||||
cell : QueueActionsCell,
|
||||
cellValue : 'this'
|
||||
}
|
||||
],
|
||||
|
||||
onShow: function () {
|
||||
this._showTable();
|
||||
},
|
||||
initialize : function() {
|
||||
this.listenTo(QueueCollection, 'sync', this._showTable);
|
||||
},
|
||||
|
||||
_showTable: function () {
|
||||
this.table.show(new Backgrid.Grid({
|
||||
columns : this.columns,
|
||||
collection: QueueCollection,
|
||||
className : 'table table-hover'
|
||||
}));
|
||||
onShow : function() {
|
||||
this._showTable();
|
||||
},
|
||||
|
||||
this.pager.show(new GridPager({
|
||||
columns : this.columns,
|
||||
collection: QueueCollection
|
||||
}));
|
||||
}
|
||||
});
|
||||
});
|
||||
_showTable : function() {
|
||||
this.table.show(new Backgrid.Grid({
|
||||
columns : this.columns,
|
||||
collection : QueueCollection,
|
||||
className : 'table table-hover'
|
||||
}));
|
||||
|
||||
this.pager.show(new GridPager({
|
||||
columns : this.columns,
|
||||
collection : QueueCollection
|
||||
}));
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue