1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2025-07-13 01:20:22 +02:00
Files
Sonarr/src/UI/Cells/QualityProfileCell.js

26 lines
678 B
JavaScript
Raw Normal View History

2013-07-17 17:39:41 -07:00
'use strict';
define(
[
'backgrid',
2013-11-10 20:09:11 -08:00
'Quality/QualityProfileCollection',
'underscore'
], function (Backgrid, QualityProfileCollection,_) {
2013-07-17 17:39:41 -07:00
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;
}
});
});