Add css class per task type to table columns

This commit is contained in:
2019-03-22 14:06:54 +01:00
parent 022fc9a1b2
commit 375182a781

View File

@@ -45,15 +45,24 @@ export class ColumnBase {
return ''; return '';
} }
/**
* Object with css classes to use on the column
* @returns {Object} Object with css classes
*/
getColumnClasses() {
// Should be overridden
let classes = {}
classes[this.columnType] = true;
return classes;
}
/** /**
* Object with css classes to use on the header cell * Object with css classes to use on the header cell
* @returns {Object} Object with css classes * @returns {Object} Object with css classes
*/ */
getHeaderCellClasses() { getHeaderCellClasses() {
// Should be overridden // Should be overridden
let classes = {} return this.getColumnClasses();
classes[this.columnType] = true;
return classes;
} }
/** /**
@@ -64,8 +73,7 @@ export class ColumnBase {
*/ */
getCellClasses(rawCellValue, rowObject) { getCellClasses(rawCellValue, rowObject) {
// Should be overridden // Should be overridden
let classes = {} let classes = this.getColumnClasses();
classes[this.columnType] = true;
classes['highlight'] = !!this.isHighLighted; classes['highlight'] = !!this.isHighLighted;
return classes; return classes;
} }