UI Cleanup - Updated Cells subtree.

This commit is contained in:
Taloth Saldono
2015-02-13 22:04:39 +01:00
parent 83b8ab8fe9
commit 7b5c0a952b
23 changed files with 334 additions and 143 deletions
+9 -2
View File
@@ -5,14 +5,20 @@ require('bootstrap');
module.exports = Backgrid.Cell.extend({
className : 'approval-status-cell',
template : 'Cells/ApprovalStatusCellTemplate',
render : function(){
render : function() {
var rejections = this.model.get(this.column.get('name'));
if(rejections.length === 0) {
if (rejections.length === 0) {
return this;
}
this.templateFunction = Marionette.TemplateCache.get(this.template);
var html = this.templateFunction(rejections);
this.$el.html('<i class="icon-exclamation-sign"/>');
this.$el.popover({
content : html,
html : true,
@@ -21,6 +27,7 @@ module.exports = Backgrid.Cell.extend({
placement : 'left',
container : this.$el
});
return this;
}
});