Skip to content

Commit ef63e79

Browse files
authored
Fixes #160. Use css word-wrap: break-word; where possible to break words that are too long. (#163)
This issue is obvious with files names that are very long. Applied to fix to collectios, datasets, spaces titles as well where I saw an issue. There might be more places where this could be applied.
1 parent bdead0e commit ef63e79

File tree

10 files changed

+13
-8
lines changed

10 files changed

+13
-8
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ script to fix this.
1818
- Files were not properly reindexed when the Move button was used to move a file into or out of a folder in a dataset.
1919
- When adding a file to a dataset by URL, prioritize the URL `content-type` header over the file content type established
2020
by looking at the file name extension.
21+
- Wrap words across lines to stay within interface elements. [#160](https://github.com/clowder-framework/clowder/issues/160)
2122

2223
## 1.14.0 - 2021-01-07
2324

app/views/collectionofdatasets.scala.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989

9090
</ol>
9191
<div class="col-xs-12 collection-title" id="coll-title">
92-
<h1 id ="collectiontitle" class="inline"><span class="glyphicon glyphicon-th-large"></span> @Html(collection.name)</h1>
92+
<h1 id ="collectiontitle" class="inline break-word"><span class="glyphicon glyphicon-th-large"></span> @Html(collection.name)</h1>
9393
@if(!collection.trash && Permission.checkPermission(Permission.EditCollection, ResourceRef(ResourceRef.collection, collection.id))) {
9494
<h3 id="h-edit-title" class="hiddencomplete">
9595
<a id="edit-title" href="javascript:updateTitle()" edit="Click to edit title">

app/views/datasets/listitem.scala.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
<div class="col-md-8 col-lg-8 col-sm-8">
3030
<div class="row">
3131
<div class="col-xs-12">
32-
<span class="h2"><a href="@(routes.Datasets.dataset(dataset.id))">@Html(dataset.name)</a></span>
32+
<span class="h2"><a href="@(routes.Datasets.dataset(dataset.id))" class="break-word">@Html(dataset.name)</a></span>
3333
</div>
3434
</div>
3535
<div class="row">

app/views/file.scala.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@
257257
<div class="row">
258258
<div id="file-name-div" class="file-title-div col-xs-12">
259259
<div id="prf-file-name" class="text-left inline">
260-
<h1 id="file-name-title" class="inline"> <span class="glyphicon glyphicon-file"></span> @Html(file.filename)</h1>
260+
<h1 id="file-name-title" class="inline break-word"> <span class="glyphicon glyphicon-file"></span> @Html(file.filename)</h1>
261261
@if(Permission.checkPermission(Permission.EditFile, ResourceRef(ResourceRef.file, file.id))) {
262262
<div id="h-edit-file" class="hiddencomplete">
263263
<a id ="edit-file" href="javascript:updateFileName()" title="Click to edit file name.">

app/views/files/linkDownload.scala.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
@main("Download File") {
44
<div class="row">
55
<div class="col-md-12">
6-
<h1 id="file-name-title" class="inline"><span class="glyphicon glyphicon-file"></span> @Html(file.filename)</h1>
6+
<h1 id="file-name-title" class="inline break-word"><span class="glyphicon glyphicon-file"></span> @Html(file.filename)</h1>
77
</div>
88
</div>
99
<div class="row">

app/views/files/listitem.scala.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
</div>
2424

2525
<div class="col-md-10 col-sm-10 col-lg-10">
26-
<h3><a href="@(routes.Files.file(file.id, dataset, space, folder))">@file.filename</a></h3>
26+
<h3><a href="@(routes.Files.file(file.id, dataset, space, folder))" class="break-word">@file.filename</a></h3>
2727
<div class="row">
2828
<div class="col-md-8 col-lg-8 col-sm-8">
2929
<ul class="list-unstyled">

app/views/files/share.scala.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
@main("Share") {
44
<div class="row">
55
<div class="col-md-12">
6-
<h1 id="file-name-title" class="inline"><span class="glyphicon glyphicon-file"></span> @Html(file.filename)</h1>
6+
<h1 id="file-name-title" class="inline break-word"><span class="glyphicon glyphicon-file"></span> @Html(file.filename)</h1>
77
</div>
88
</div>
99
<div class="row">

app/views/spaces/spaceAllocation.scala.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ <h4>@Messages("a.contains.b", Messages("spaces.title"), Messages("dataset.title"
3737
</div>
3838
<div class="col-md-10">
3939
<div>
40-
<a href="@routes.Spaces.getSpace(s.id)" id='@s.id' class ="space">@s.name</a>
40+
<a href="@routes.Spaces.getSpace(s.id)" id='@s.id' class ="space-title">@s.name</a>
4141
</div>
4242
<div>
4343
@if(resourceType == ResourceRef.dataset) {

conf/messages

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ trial.title = Trial {0}
1212
owner.label=Owner
1313
owner.title = {0}''s {1}
1414
owner.in.resource.title={0}''s {1} in {2} <a href="{3}">{4}</a>
15-
resource.in.title= {0} in {1} <a href="{2}">{3}</a>
15+
resource.in.title= {0} in {1} <a href="{2}" class="break-word">{3}</a>
1616
list.title= {0}
1717

1818
# Basic terms

public/stylesheets/main.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -579,6 +579,10 @@ p.error, span.error {
579579
border-bottom: 1px solid #E1E1E8;
580580
}
581581

582+
.space-title {
583+
word-wrap: break-word;
584+
}
585+
582586
.space-col-right {
583587
padding-left: 50px;
584588
}

0 commit comments

Comments
 (0)