You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Lidarr/src/UI/Release/ProtocolCell.js

24 lines
618 B

var Backgrid = require('backgrid');
module.exports = Backgrid.Cell.extend({
className : 'protocol-cell',
render : function() {
var protocol = this.model.get('protocol') || 'Unknown';
var label = '??';
if (protocol) {
if (protocol === 'torrent') {
label = 'torrent';
} else if (protocol === 'usenet') {
label = 'nzb';
}
this.$el.html('<div class="label label-default protocol-{0}" title="{0}">{1}</div>'.format(protocol, label));
}
this.delegateEvents();
return this;
}
});