mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-12-23 02:05:27 +02:00
26 lines
678 B
JavaScript
26 lines
678 B
JavaScript
'use strict';
|
|
define(
|
|
[
|
|
'backgrid',
|
|
'Quality/QualityProfileCollection',
|
|
'underscore'
|
|
], function (Backgrid, QualityProfileCollection,_) {
|
|
return Backgrid.Cell.extend({
|
|
className: 'quality-profile-cell',
|
|
|
|
render: function () {
|
|
|
|
this.$el.empty();
|
|
var qualityProfileId = this.model.get(this.column.get('name'));
|
|
|
|
var profile = _.findWhere(QualityProfileCollection.models, { id: qualityProfileId });
|
|
|
|
if (profile) {
|
|
this.$el.html(profile.get('name'));
|
|
}
|
|
|
|
return this;
|
|
}
|
|
});
|
|
});
|