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.
33 lines
875 B
33 lines
875 B
var Backgrid = require('backgrid');
|
|
var Marionette = require('marionette');
|
|
require('bootstrap');
|
|
|
|
module.exports = Backgrid.Cell.extend({
|
|
className : 'approval-status-cell',
|
|
template : 'Cells/ApprovalStatusCellTemplate',
|
|
|
|
render : function() {
|
|
|
|
var rejections = this.model.get(this.column.get('name'));
|
|
|
|
if (rejections.length === 0) {
|
|
return this;
|
|
}
|
|
|
|
this.templateFunction = Marionette.TemplateCache.get(this.template);
|
|
|
|
var html = this.templateFunction(rejections);
|
|
this.$el.html('<i class="icon-lidarr-form-danger"/>');
|
|
|
|
this.$el.popover({
|
|
content : html,
|
|
html : true,
|
|
trigger : 'hover',
|
|
title : this.column.get('title'),
|
|
placement : 'left',
|
|
container : this.$el
|
|
});
|
|
|
|
return this;
|
|
}
|
|
}); |