Repository: climate Updated Branches: refs/heads/master 2ffc6ecab -> dc57582e6
CLIMATE-375 - Truncate long dataset names in DatasetDisplay - Long dataset names are now truncated down in the dataset display. This uses CSS to do the truncation based on row size. It could also be done with a filter but that was decided against due to the difficulty in associating a number of characters with a row width given the semi-dynamic nature of the layout. Project: http://git-wip-us.apache.org/repos/asf/climate/repo Commit: http://git-wip-us.apache.org/repos/asf/climate/commit/debe8121 Tree: http://git-wip-us.apache.org/repos/asf/climate/tree/debe8121 Diff: http://git-wip-us.apache.org/repos/asf/climate/diff/debe8121 Branch: refs/heads/master Commit: debe812189d99b104385dbc5caa908d9dcf9d3d9 Parents: 2ffc6ec Author: Michael Joyce <[email protected]> Authored: Thu Sep 4 10:30:58 2014 -0700 Committer: Michael Joyce <[email protected]> Committed: Thu Sep 4 10:30:58 2014 -0700 ---------------------------------------------------------------------- ocw-ui/frontend/app/styles/main.css | 9 +++++++++ ocw-ui/frontend/app/views/main.html | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/climate/blob/debe8121/ocw-ui/frontend/app/styles/main.css ---------------------------------------------------------------------- diff --git a/ocw-ui/frontend/app/styles/main.css b/ocw-ui/frontend/app/styles/main.css index fb42ccd..b06a9e7 100644 --- a/ocw-ui/frontend/app/styles/main.css +++ b/ocw-ui/frontend/app/styles/main.css @@ -46,6 +46,15 @@ body { overflow-x: hidden; } +.datasetNameDisplay { + max-width: 320px; + display: inline-block; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + padding-left: 0; +} + #ocw-navbar { margin-bottom: 0; } http://git-wip-us.apache.org/repos/asf/climate/blob/debe8121/ocw-ui/frontend/app/views/main.html ---------------------------------------------------------------------- diff --git a/ocw-ui/frontend/app/views/main.html b/ocw-ui/frontend/app/views/main.html index 2f428e5..89ca003 100644 --- a/ocw-ui/frontend/app/views/main.html +++ b/ocw-ui/frontend/app/views/main.html @@ -110,7 +110,7 @@ under the License. <div ng-repeat="dataset in datasets"> <div class="row"> <!--Data section--> - <div class="col-md-8 col-md-offset-1 muted"> + <div class="datasetNameDisplay col-md-8 col-md-offset-1 muted" tooltip="{{dataset.name}}"> {{dataset.name}} </div> <div class="col-md-1 col-md-offset-2">
