1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-09 12:32:31 +01:00
Radarr/UI/Cells/QualityProfileCell.js
2013-07-17 17:39:41 -07:00

25 lines
654 B
JavaScript

'use strict';
define(
[
'backgrid',
'Quality/QualityProfileCollection'
], 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;
}
});
});