1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-25 02:30:20 +02:00
Sonarr/src/UI/Cells/QualityProfileCell.js

25 lines
654 B
JavaScript
Raw Normal View History

2013-07-18 03:39:41 +03:00
'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;
}
});
});