1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-27 23:06:29 -04:00
Files
Sonarr/src/UI/Cells/ProfileCell.js
T
Keivan Beigi 428a1439e5 rjs -> webpack
2015-02-02 17:43:14 -08:00

16 lines
513 B
JavaScript

var Backgrid = require('backgrid');
var ProfileCollection = require('../Profile/ProfileCollection');
var _ = require('underscore');
module.exports = Backgrid.Cell.extend({
className : 'profile-cell',
render : function(){
this.$el.empty();
var profileId = this.model.get(this.column.get('name'));
var profile = _.findWhere(ProfileCollection.models, {id : profileId});
if(profile) {
this.$el.html(profile.get('name'));
}
return this;
}
});