mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-17 21:25:39 -04:00
cleaned up all the cells. there is a cell for pretty much everything.
This commit is contained in:
19
UI/Release/ApprovalStatusCell.js
Normal file
19
UI/Release/ApprovalStatusCell.js
Normal file
@@ -0,0 +1,19 @@
|
||||
"use strict";
|
||||
NzbDrone.Release.ApprovalStatusCell = Backgrid.Cell.extend({
|
||||
|
||||
className: "approval-status-cell",
|
||||
|
||||
render: function () {
|
||||
var rejections = this.model.get(this.column.get("name"));
|
||||
|
||||
var result = '';
|
||||
|
||||
_.each(rejections, function (reason) {
|
||||
result += reason + ' ';
|
||||
});
|
||||
|
||||
this.$el.html(result);
|
||||
this.delegateEvents();
|
||||
return this;
|
||||
}
|
||||
});
|
||||
27
UI/Release/DownloadReportCell.js
Normal file
27
UI/Release/DownloadReportCell.js
Normal file
@@ -0,0 +1,27 @@
|
||||
"use strict";
|
||||
NzbDrone.Release.DownloadReportCell = Backgrid.Cell.extend({
|
||||
|
||||
className: "download-report-cell",
|
||||
|
||||
events: {
|
||||
'click': '_onClick'
|
||||
},
|
||||
|
||||
_onClick: function () {
|
||||
|
||||
var self = this;
|
||||
|
||||
this.$el.html('<i class ="icon-spinner icon-spin" />');
|
||||
this.model.save()
|
||||
.always(function () {
|
||||
self.$el.html('<i class ="icon-download-alt" />');
|
||||
});
|
||||
},
|
||||
|
||||
render: function () {
|
||||
|
||||
this.$el.html('<i class ="icon-download-alt" />');
|
||||
return this;
|
||||
|
||||
}
|
||||
});
|
||||
@@ -2,11 +2,12 @@
|
||||
define([
|
||||
'app',
|
||||
'Release/Collection',
|
||||
'Release/ApprovalStatusCell',
|
||||
'Shared/SpinnerView',
|
||||
'Shared/Toolbar/ToolbarLayout',
|
||||
'Shared/Cells/EpisodeNumberCell',
|
||||
'Shared/Cells/FileSizeCell',
|
||||
'Shared/Cells/ApprovalStatusCell'
|
||||
'Cells/EpisodeNumberCell',
|
||||
'Cells/FileSizeCell',
|
||||
'Cells/IndexerCell'
|
||||
],
|
||||
function () {
|
||||
NzbDrone.Release.Layout = Backbone.Marionette.Layout.extend({
|
||||
@@ -22,13 +23,13 @@ define([
|
||||
name : 'indexer',
|
||||
label : 'Indexer',
|
||||
sortable: true,
|
||||
cell : Backgrid.StringCell
|
||||
cell : NzbDrone.Cells.IndexerCell
|
||||
},
|
||||
{
|
||||
name : 'size',
|
||||
label : 'Size',
|
||||
sortable: true,
|
||||
cell : NzbDrone.Shared.Cells.FileSizeCell
|
||||
cell : NzbDrone.Cells.FileSizeCell
|
||||
},
|
||||
{
|
||||
name : 'title',
|
||||
@@ -38,16 +39,14 @@ define([
|
||||
},
|
||||
{
|
||||
name : 'episodeNumbers',
|
||||
season : 'seasonNumber',
|
||||
airDate : 'airDate',
|
||||
episodes: 'episodeNumbers',
|
||||
label : 'season',
|
||||
cell : NzbDrone.Shared.Cells.EpisodeNumberCell
|
||||
cell : NzbDrone.Cells.EpisodeNumberCell
|
||||
},
|
||||
{
|
||||
name : 'rejections',
|
||||
label: 'decision',
|
||||
cell : NzbDrone.Shared.Cells.ApprovalStatusCell
|
||||
cell : NzbDrone.Release.ApprovalStatusCell
|
||||
}
|
||||
],
|
||||
|
||||
|
||||
Reference in New Issue
Block a user