mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-15 01:23:53 -07:00
Episode grid will show downloading on grab
New: Update episode status in UI on grab and download
This commit is contained in:
parent
b6693a20a9
commit
daeb2fc652
37 changed files with 613 additions and 128 deletions
108
UI/History/Table/HistoryTableLayout.js
Normal file
108
UI/History/Table/HistoryTableLayout.js
Normal file
|
@ -0,0 +1,108 @@
|
|||
'use strict';
|
||||
define(
|
||||
[
|
||||
'marionette',
|
||||
'backgrid',
|
||||
'History/HistoryCollection',
|
||||
'History/Table/EventTypeCell',
|
||||
'Cells/SeriesTitleCell',
|
||||
'Cells/EpisodeNumberCell',
|
||||
'Cells/EpisodeTitleCell',
|
||||
'Cells/QualityCell',
|
||||
'Cells/RelativeDateCell',
|
||||
'History/Table/HistoryDetailsCell',
|
||||
'Shared/Grid/Pager',
|
||||
'Shared/LoadingView'
|
||||
], function (Marionette,
|
||||
Backgrid,
|
||||
HistoryCollection,
|
||||
EventTypeCell,
|
||||
SeriesTitleCell,
|
||||
EpisodeNumberCell,
|
||||
EpisodeTitleCell,
|
||||
QualityCell,
|
||||
RelativeDateCell,
|
||||
HistoryDetailsCell,
|
||||
GridPager,
|
||||
LoadingView) {
|
||||
return Marionette.Layout.extend({
|
||||
template: 'History/Table/HistoryTableLayoutTemplate',
|
||||
|
||||
regions: {
|
||||
history: '#x-history',
|
||||
toolbar: '#x-toolbar',
|
||||
pager : '#x-pager'
|
||||
},
|
||||
|
||||
columns:
|
||||
[
|
||||
{
|
||||
name : 'eventType',
|
||||
label : '',
|
||||
cell : EventTypeCell,
|
||||
cellValue: 'this'
|
||||
},
|
||||
{
|
||||
name : 'series',
|
||||
label: 'Series',
|
||||
cell : SeriesTitleCell
|
||||
},
|
||||
{
|
||||
name : 'episode',
|
||||
label : 'Episode',
|
||||
sortable: false,
|
||||
cell : EpisodeNumberCell
|
||||
},
|
||||
{
|
||||
name : 'episode',
|
||||
label : 'Episode Title',
|
||||
sortable: false,
|
||||
cell : EpisodeTitleCell
|
||||
},
|
||||
{
|
||||
name : 'quality',
|
||||
label : 'Quality',
|
||||
cell : QualityCell,
|
||||
sortable: false
|
||||
},
|
||||
{
|
||||
name : 'date',
|
||||
label: 'Date',
|
||||
cell : RelativeDateCell
|
||||
},
|
||||
{
|
||||
name : 'this',
|
||||
label : '',
|
||||
cell : HistoryDetailsCell,
|
||||
sortable: false
|
||||
}
|
||||
],
|
||||
|
||||
|
||||
initialize: function () {
|
||||
this.collection = new HistoryCollection();
|
||||
this.listenTo(this.collection, 'sync', this._showTable);
|
||||
},
|
||||
|
||||
|
||||
_showTable: function (collection) {
|
||||
|
||||
this.history.show(new Backgrid.Grid({
|
||||
columns : this.columns,
|
||||
collection: collection,
|
||||
className : 'table table-hover'
|
||||
}));
|
||||
|
||||
this.pager.show(new GridPager({
|
||||
columns : this.columns,
|
||||
collection: collection
|
||||
}));
|
||||
},
|
||||
|
||||
onShow: function () {
|
||||
this.history.show(new LoadingView());
|
||||
this.collection.fetch();
|
||||
}
|
||||
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue