Skip to content

Commit

Permalink
Truncate text in tables with adaptative ellipsis
Browse files Browse the repository at this point in the history
  • Loading branch information
juankaromo committed Feb 18, 2019
1 parent 33c0340 commit 7b56a87
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
6 changes: 4 additions & 2 deletions public/controllers/management/management.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,9 +233,11 @@ export class ManagementController {
breadCrumbBack(goRoot = false) {
if (this.currentRule) {
this.$scope.$broadcast('closeRuleView');
} else if (this.currentDecoder) {
}
if (this.currentDecoder) {
this.$scope.$broadcast('closeDecoderView');
} else if (this.currentList) {
}
if (this.currentList) {
this.$scope.$broadcast('closeListView');
}
if (goRoot) {
Expand Down
18 changes: 7 additions & 11 deletions public/directives/wz-table/wz-table.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,12 @@
<tbody>
<tr ng-class="allowClick ? 'cursor-pointer' : ''" class="wz-word-wrap" ng-repeat="item in pagedItems[currentPage] | filter:{item:'!'}"
ng-click="clickAction(item)">
<td ng-repeat="key in keys">
{{
parseValue(key,item) | limitTo: extraLimit ? 100 : 25
}}
<span ng-if="parseValue(key,item).length > (extraLimit ? 100 : 25)">...</span>
<md-tooltip ng-if="parseValue(key,item).length > (extraLimit ? 100 : 25)" md-direction="bottom"
class="wz-tooltip">
{{ parseValue(key,item) }}
</md-tooltip>
<td ng-repeat="key in keys" class="wz-text-truncatable">
<span tooltip="{{ parseValue(key,item) }}" tooltip-placement="bottom">
{{
parseValue(key,item)
}}
</span>
</td>
<td ng-if="path === '/agents'" ng-click="$event.stopPropagation()" class="cursor-default action-btn-td">
<i ng-click="clickAction(item, 'discover'); $event.stopPropagation()" class="fa fa-fw fa-compass cursor-pointer"
Expand All @@ -49,8 +46,7 @@
</td>
<td ng-if="path === '/agents/groups' && adminMode" ng-click="$event.stopPropagation()" class="cursor-default action-btn-td">
<i ng-if="removingGroup !== item.name && item.name !== 'default'" ng-click="showConfirmRemoveGroup($event, item); $event.stopPropagation()"
class="fa fa-fw fa-trash cursor-pointer" tooltip="Remove this group" tooltip-placement="left"
aria-hidden="true"></i>
class="fa fa-fw fa-trash cursor-pointer" aria-hidden="true"></i>
<i ng-if="removingGroup !== item.name" ng-click="editGroup(item); $event.stopPropagation()" class="fa fa-fw fa-pencil cursor-pointer"
tooltip="Edit this group configuration" tooltip-placement="left" aria-hidden="true"></i>
<div ng-if="removingGroup === item.name && item.name !== 'default'" class="confirmEmbedBubble">
Expand Down

0 comments on commit 7b56a87

Please sign in to comment.