mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
Backgrid template mixin will build the template itself
This commit is contained in:
@@ -1,10 +1,13 @@
|
|||||||
|
"use strict";
|
||||||
|
|
||||||
Backgrid.TemplateBackedCell = Backgrid.Cell.extend({
|
Backgrid.TemplateBackedCell = Backgrid.Cell.extend({
|
||||||
className: '',
|
className: '',
|
||||||
template: 'Series/Index/Table/ControlsColumnTemplate',
|
template: 'Series/Index/Table/ControlsColumnTemplate',
|
||||||
|
|
||||||
render: function () {
|
render: function () {
|
||||||
var data = this.model.toJSON();
|
var data = this.model.toJSON();
|
||||||
var html = Marionette.Renderer.render(this.template, data);
|
var templateFunction = Marionette.TemplateCache.get(this.template);
|
||||||
|
var html = new Handlebars.SafeString(templateFunction(data));
|
||||||
this.$el.html(html);
|
this.$el.html(html);
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
|
Reference in New Issue
Block a user