mirror of
https://github.com/Sonarr/Sonarr
synced 2024-12-26 17:57:43 +00:00
Added TemplateBackedCell for all your cell template needs
This commit is contained in:
parent
f8bae13e1c
commit
0db39edb2c
3 changed files with 6 additions and 18 deletions
|
@ -34,21 +34,8 @@ Backgrid.AirDateCell = Backgrid.Cell.extend({
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Backgrid.EpisodeProgressCell = Backgrid.Cell.extend({
|
Backgrid.TemplateBackedCell = Backgrid.Cell.extend({
|
||||||
className: "episode-progress-cell",
|
className: '',
|
||||||
template: 'Series/EpisodeProgressTemplate',
|
|
||||||
|
|
||||||
render: function () {
|
|
||||||
var data = this.model.toJSON();
|
|
||||||
var html = Marionette.Renderer.render(this.template, data);
|
|
||||||
this.$el.html(html);
|
|
||||||
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
Backgrid.ControlsColumnCell = Backgrid.Cell.extend({
|
|
||||||
className: "controls-cell",
|
|
||||||
template: 'Series/Index/Table/ControlsColumnTemplate',
|
template: 'Series/Index/Table/ControlsColumnTemplate',
|
||||||
|
|
||||||
render: function () {
|
render: function () {
|
||||||
|
|
|
@ -35,7 +35,7 @@ define([
|
||||||
name: 'title',
|
name: 'title',
|
||||||
label: 'Title',
|
label: 'Title',
|
||||||
editable: false,
|
editable: false,
|
||||||
cell: 'string',
|
cell: Backgrid.TemplateBackedCell.extend({ template: 'Series/Index/Table/SeriesTitleTemplate' }),
|
||||||
headerCell: 'nzbDrone'
|
headerCell: 'nzbDrone'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -71,7 +71,7 @@ define([
|
||||||
label: 'Episodes',
|
label: 'Episodes',
|
||||||
editable: false,
|
editable: false,
|
||||||
sortable: false,
|
sortable: false,
|
||||||
cell: 'episodeProgress',
|
cell: Backgrid.TemplateBackedCell.extend({ template: 'Series/EpisodeProgressTemplate' }),
|
||||||
headerCell: 'nzbDrone'
|
headerCell: 'nzbDrone'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -79,7 +79,7 @@ define([
|
||||||
label: '',
|
label: '',
|
||||||
editable: false,
|
editable: false,
|
||||||
sortable: false,
|
sortable: false,
|
||||||
cell: 'controlsColumn',
|
cell: Backgrid.TemplateBackedCell.extend({ template: 'Series/Index/Table/ControlsColumnTemplate' }),
|
||||||
headerCell: 'nzbDrone'
|
headerCell: 'nzbDrone'
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
1
UI/Series/Index/Table/SeriesTitleTemplate.html
Normal file
1
UI/Series/Index/Table/SeriesTitleTemplate.html
Normal file
|
@ -0,0 +1 @@
|
||||||
|
<a href="series/details/{{titleSlug}}">{{title}}</a>
|
Loading…
Reference in a new issue