Skip to content

Commit

Permalink
Merge pull request openshift#8769 from spadgett/template-linebreaks
Browse files Browse the repository at this point in the history
Merged by openshift-bot
  • Loading branch information
OpenShift Bot committed May 6, 2016
2 parents d1bfed6 + a3779bd commit fd7caa6
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
4 changes: 4 additions & 0 deletions assets/app/styles/_core.less
Original file line number Diff line number Diff line change
Expand Up @@ -648,6 +648,10 @@ label.checkbox {
margin-left: 3px;
}

.resource-description {
.word-break();
.pre-wrap();
}

// Misc
// TODO: pull out into _partials where it makes sense
Expand Down
6 changes: 6 additions & 0 deletions assets/app/styles/_mixins.less
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@
min-width: 0; // firefox (1)
}

// Sequences of whitespace are preserved. Lines are broken at newline
// characters, at <br>, and as necessary to fill line boxes.
.pre-wrap {
white-space: pre-wrap;
}

// Linear-gradient stripes
.striped(@color: rgba(255,255,255,.15); @angle: 45deg) {
background-image: -webkit-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);
Expand Down
4 changes: 2 additions & 2 deletions assets/app/views/directives/osc-image-summary.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ <h1>{{ name || resource.metadata.name }}</h1>
<div ng-show="resource | annotation:'provider'">Provider: {{ resource | annotation:'provider' }}</div>
<div ng-show="resource.metadata.namespace">Namespace: {{ resource.metadata.namespace }}</div>
</div>
<div class="description gutter-bottom">
<truncate-long-text content="resource | description" limit="256" use-word-boundary="true"></truncate-long-text>
<div class="resource-description gutter-bottom"
ng-bind-html="resource | description | linky">
</div>
5 changes: 3 additions & 2 deletions pkg/assets/bindata.go
Original file line number Diff line number Diff line change
Expand Up @@ -14407,8 +14407,7 @@ var _scriptsTemplatesJs = []byte(`angular.module('openshiftConsoleTemplates', []
"<div ng-show=\"resource | annotation:'provider'\">Provider: {{ resource | annotation:'provider' }}</div>\n" +
"<div ng-show=\"resource.metadata.namespace\">Namespace: {{ resource.metadata.namespace }}</div>\n" +
"</div>\n" +
"<div class=\"description gutter-bottom\">\n" +
"<truncate-long-text content=\"resource | description\" limit=\"256\" use-word-boundary=\"true\"></truncate-long-text>\n" +
"<div class=\"resource-description gutter-bottom\" ng-bind-html=\"resource | description | linky\">\n" +
"</div>"
);

Expand Down Expand Up @@ -96014,6 +96013,7 @@ to{transform:rotate(359deg)}
.force-hide-secondary-nav-pf .persistent-secondary .nav-pf-persistent-secondary,.visible-xlg-inline-block{display:none!important}
.word-break-all{word-break:break-all;word-break:break-word;overflow-wrap:break-word}
.word-break{word-wrap:break-word;word-break:break-word;overflow-wrap:break-word;min-width:0}
.pre-wrap{white-space:pre-wrap}
@media (min-width:1600px){.visible-xlg-inline-block{display:inline-block!important}
}
.btn-file{position:relative;overflow:hidden}
Expand Down Expand Up @@ -96269,6 +96269,7 @@ label.checkbox{font-weight:400}
.env-variable-list li .value,.label-list li .value{max-width:500px}
.env-variable-list li .btn,.label-list li .btn{vertical-align:top}
.label+.label{margin-left:3px}
.resource-description{word-wrap:break-word;word-break:break-word;overflow-wrap:break-word;min-width:0;white-space:pre-wrap}
.action-inline{margin-left:5px;font-size:11px}
.action-inline i.fa,.action-inline i.pficon{color:#4d5258;margin-right:5px}
.project-summary{-webkit-flex:1 0 90%;-moz-flex:1 0 90%;-ms-flex:1 0 90%;flex:1 0 90%;max-width:90%}
Expand Down

0 comments on commit fd7caa6

Please sign in to comment.