How to change the background color of records in a list view according to the Status ??
How to change the background color of records in a list view according to the Status ??
Hello M kumar
'm updating the color based on the Priority of the Note records:
({
extendsFrom: 'RecordlistView',
initialize: function (options) {
this._super("initialize", [options]);
this.listenTo(this.collection, 'data:sync:complete', this.renderNextReviewDateColor);
},
renderNextReviewDateColor: function() {
_.each(this.rowFields, function(field) {
var obj = _.findWhere(field, {name: 'high_priority_note_c'});
if (!_.isUndefined(obj)) {
var high_priority = obj.value;
if (high_priority ==true ) {
obj.$el.parents('td').css("background-color", "#ffff80");
} else {
obj.$el.parents('td').css("background-color", "transparent");
}
}
});
},
})
HTH
Regards,
Angel M.