Skip to content

Fix toggle link positioning for truncation directive #1316

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 7, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions app/styles/_core.less
Original file line number Diff line number Diff line change
Expand Up @@ -1286,3 +1286,13 @@ copy-to-clipboard .input-group.limit-width {
width: 100%;
}
}

// Within truncation directive controls spacing between content and toggle link
.truncation-block {
margin-right: 10px;
}

.truncation-collapse-link {
margin-left: 10px;
white-space: nowrap;
}
8 changes: 4 additions & 4 deletions app/views/directives/truncate-long-text.html
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<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}}">
<span ng-attr-title="{{content}}" class="truncation-block">
<span ng-bind-html="truncatedContent | highlightKeywords : keywords" class="truncated-content"></span>&hellip;
</span>
<a ng-if="expandable" href="" ng-click="toggles.expanded = true" style="margin-left: 5px; white-space: nowrap;">See all</a>
<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">Collapse</a></span>
<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">Collapse</a></span>
<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>
Expand Down
8 changes: 4 additions & 4 deletions dist/scripts/templates.js
Original file line number Diff line number Diff line change
Expand Up @@ -8945,18 +8945,18 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
"<span ng-if=\"!truncated\" ng-bind-html=\"content | highlightKeywords : keywords\" class=\"truncated-content\"></span>\n" +
"<span ng-if=\"truncated\">\n" +
"<span ng-if=\"!toggles.expanded\">\n" +
"<span ng-attr-title=\"{{content}}\">\n" +
"<span ng-attr-title=\"{{content}}\" class=\"truncation-block\">\n" +
"<span ng-bind-html=\"truncatedContent | highlightKeywords : keywords\" class=\"truncated-content\"></span>&hellip;\n" +
"</span>\n" +
"<a ng-if=\"expandable\" href=\"\" ng-click=\"toggles.expanded = true\" style=\"margin-left: 5px; white-space: nowrap\">See all</a>\n" +
"<a ng-if=\"expandable\" href=\"\" ng-click=\"toggles.expanded = true\" class=\"nowrap\">See All</a>\n" +
"</span>\n" +
"<span ng-if=\"toggles.expanded\">\n" +
"<div ng-if=\"prettifyJson\" class=\"well\">\n" +
"<span class=\"pull-right\" style=\"margin-top: -10px\"><a href=\"\" ng-click=\"toggles.expanded = false\">Collapse</a></span>\n" +
"<span class=\"pull-right\" style=\"margin-top: -10px\"><a href=\"\" ng-click=\"toggles.expanded = false\" class=\"truncation-collapse-link\">Collapse</a></span>\n" +
"<span ng-bind-html=\"content | prettifyJSON | highlightKeywords : keywords\" class=\"pretty-json truncated-content\"></span>\n" +
"</div>\n" +
"<span ng-if=\"!prettifyJson\">\n" +
"<span class=\"pull-right\"><a href=\"\" ng-click=\"toggles.expanded = false\">Collapse</a></span>\n" +
"<span class=\"pull-right\"><a href=\"\" ng-click=\"toggles.expanded = false\" class=\"truncation-collapse-link\">Collapse</a></span>\n" +
"<span ng-bind-html=\"content | highlightKeywords : keywords\" class=\"truncated-content\"></span>\n" +
"</span>\n" +
"</span>\n" +
Expand Down
2 changes: 2 additions & 0 deletions dist/styles/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -4134,6 +4134,8 @@ copy-to-clipboard .input-group.limit-width{max-width:300px}
.tech-preview-header{justify-content:space-between}
@media (max-width:479px){.col-xxs-12{width:100%}
}
.truncation-block{margin-right:10px}
.truncation-collapse-link{margin-left:10px;white-space:nowrap}
.data-toolbar{padding:5px 0}
.data-toolbar.other-resources-toolbar .data-toolbar-dropdown{min-width:210px}
.data-toolbar .checkbox{margin-bottom:0;margin-top:10px}
Expand Down