forked from openshift/origin-web-console
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtruncate-long-text.html
19 lines (19 loc) · 1.11 KB
/
truncate-long-text.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<span ng-if="!truncated" ng-bind-html="content | highlightKeywords : keywords" class="truncated-content"></span>
<span ng-if="truncated">
<span ng-if="!toggles.expanded">
<span ng-attr-title="{{content}}" class="truncation-block">
<span ng-bind-html="truncatedContent | highlightKeywords : keywords" class="truncated-content"></span>…
</span>
<a ng-if="expandable" href="" ng-click="toggles.expanded = true" class="nowrap">See All</a>
</span>
<span ng-if="toggles.expanded">
<div ng-if="prettifyJson" class="well">
<span class="pull-right" style="margin-top: -10px;"><a href="" ng-click="toggles.expanded = false" class="truncation-collapse-link">Collapse</a></span>
<span ng-bind-html="content | prettifyJSON | highlightKeywords : keywords" class="pretty-json truncated-content"></span>
</div>
<span ng-if="!prettifyJson">
<span class="pull-right"><a href="" ng-click="toggles.expanded = false" class="truncation-collapse-link">Collapse</a></span>
<span ng-bind-html="content | highlightKeywords : keywords" class="truncated-content"></span>
</span>
</span>
</span>