mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-14 09:03:49 -07:00
Added FileSizeCell
This commit is contained in:
parent
890d1f2398
commit
5f8c58adb9
4 changed files with 24 additions and 20 deletions
|
@ -1,5 +1,5 @@
|
||||||
"use strict";
|
"use strict";
|
||||||
define(['app'], function () {
|
define(['app', 'Shared/Cells/FileSizeCell'], function () {
|
||||||
|
|
||||||
NzbDrone.Episode.Search.Layout = Backbone.Marionette.Layout.extend({
|
NzbDrone.Episode.Search.Layout = Backbone.Marionette.Layout.extend({
|
||||||
template: 'Episode/Search/LayoutTemplate',
|
template: 'Episode/Search/LayoutTemplate',
|
||||||
|
@ -19,7 +19,7 @@ define(['app'], function () {
|
||||||
name : 'size',
|
name : 'size',
|
||||||
label : 'Size',
|
label : 'Size',
|
||||||
sortable: true,
|
sortable: true,
|
||||||
cell : Backgrid.IntegerCell
|
cell : NzbDrone.Shared.Cells.FileSizeCell
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name : 'title',
|
name : 'title',
|
||||||
|
@ -27,16 +27,6 @@ define(['app'], function () {
|
||||||
sortable: true,
|
sortable: true,
|
||||||
cell : Backgrid.StringCell
|
cell : Backgrid.StringCell
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name : 'seasonNumber',
|
|
||||||
label: 'season',
|
|
||||||
cell : Backgrid.IntegerCell
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name : 'episodeNumber',
|
|
||||||
label: 'episode',
|
|
||||||
cell : Backgrid.StringCell
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name : 'approved',
|
name : 'approved',
|
||||||
label: 'Approved',
|
label: 'Approved',
|
||||||
|
@ -44,13 +34,7 @@ define(['app'], function () {
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
|
onShow: function () {
|
||||||
|
|
||||||
initialize: function () {
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
onShow :function(){
|
|
||||||
if (!this.isClosed) {
|
if (!this.isClosed) {
|
||||||
this.grid.show(new Backgrid.Grid(
|
this.grid.show(new Backgrid.Grid(
|
||||||
{
|
{
|
||||||
|
|
|
@ -6,6 +6,10 @@ define(['app', 'Release/Model'], function () {
|
||||||
|
|
||||||
mode: 'client',
|
mode: 'client',
|
||||||
|
|
||||||
|
state: {
|
||||||
|
pageSize: 2000
|
||||||
|
},
|
||||||
|
|
||||||
fetchEpisodeReleases: function (episodeId) {
|
fetchEpisodeReleases: function (episodeId) {
|
||||||
return this.fetch({ data: { episodeId: episodeId }});
|
return this.fetch({ data: { episodeId: episodeId }});
|
||||||
}
|
}
|
||||||
|
|
14
UI/Shared/Cells/FileSizeCell.js
Normal file
14
UI/Shared/Cells/FileSizeCell.js
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
"use strict";
|
||||||
|
NzbDrone.Shared.Cells.FileSizeCell = Backgrid.Cell.extend({
|
||||||
|
|
||||||
|
className: "file-size-cell",
|
||||||
|
|
||||||
|
render: function () {
|
||||||
|
|
||||||
|
var size = Number(this.model.get(this.column.get("name")));
|
||||||
|
this.$el.html(size.bytes(1));
|
||||||
|
this.delegateEvents();
|
||||||
|
return this;
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
|
@ -63,7 +63,9 @@ define('app', ['shared/modal/region'], function (ModalRegion) {
|
||||||
|
|
||||||
window.NzbDrone.Shared = {
|
window.NzbDrone.Shared = {
|
||||||
Toolbar : {},
|
Toolbar : {},
|
||||||
Messenger: {}
|
Messenger: {},
|
||||||
|
Cells: {}
|
||||||
|
|
||||||
};
|
};
|
||||||
window.NzbDrone.Calendar = {};
|
window.NzbDrone.Calendar = {};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue