mirror of
https://github.com/valitydev/redash.git
synced 2024-11-07 09:28:51 +00:00
getredash/redash#2215 Custom CSS based on column type
This commit is contained in:
parent
c65b637bc4
commit
5dd76674ff
@ -1,4 +1,4 @@
|
||||
<td ng-class="'content-align-' + column.alignContent">
|
||||
<td ng-class="'content-align-' + column.alignContent + ' display-as-' + column.displayAs">
|
||||
<div ng-if="allowHTML" ng-bind-html="value"></div>
|
||||
<div ng-if="!allowHTML" ng-bind="value"></div>
|
||||
</td>
|
||||
|
@ -3,8 +3,7 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th ng-repeat="column in $ctrl.columns" ng-click="$ctrl.onColumnHeaderClick($event, column)"
|
||||
class="sortable-column" ng-class="'content-align-' + column.alignContent"
|
||||
width="{{ ['number', 'boolean', 'datetime', 'image'].indexOf(column.displayAs) >= 0 ? '1%' : undefined }}">
|
||||
class="sortable-column" ng-class="'content-align-' + column.alignContent + ' display-as-' + column.displayAs">
|
||||
<span ng-if="($ctrl.orderBy.length > 1) && ($ctrl.orderByColumnsIndex[column.name] > 0)"
|
||||
class="sort-order-indicator">{{ $ctrl.orderByColumnsIndex[column.name] }}</span>
|
||||
<span>{{column.title}}</span>
|
||||
|
@ -49,4 +49,12 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.display-as-number,
|
||||
.display-as-boolean,
|
||||
.display-as-datetime,
|
||||
.display-as-image {
|
||||
width: 1%;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
<td>
|
||||
<td ng-class="'display-as-' + column.displayAs">
|
||||
<div ng-if="!isValid" class="json-cell-invalid">{{ value }}</div>
|
||||
<div ng-show="isValid" class="json-cell-valid"></div>
|
||||
</td>
|
||||
|
Loading…
Reference in New Issue
Block a user