Add css class per task type to table columns
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user