mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
cleaned up all the cells. there is a cell for pretty much everything.
This commit is contained in:
19
UI/Cells/TemplatedCell.js
Normal file
19
UI/Cells/TemplatedCell.js
Normal file
@@ -0,0 +1,19 @@
|
||||
"use strict";
|
||||
|
||||
define(['app','Cells/NzbDroneCell'], function () {
|
||||
NzbDrone.Cells.TemplatedCell = NzbDrone.Cells.NzbDroneCell.extend({
|
||||
|
||||
|
||||
render: function () {
|
||||
|
||||
var templateName = this.column.get('template') || this.template;
|
||||
|
||||
this.templateFunction = Marionette.TemplateCache.get(templateName);
|
||||
var data = this.cellValue.toJSON();
|
||||
var html = this.templateFunction(data);
|
||||
this.$el.html(html);
|
||||
|
||||
return this;
|
||||
}
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user