From 03d541940298ee0661a9a5cea7d271c75ebb70da Mon Sep 17 00:00:00 2001 From: anonymous <anonymous> Date: Fri, 11 Jan 2019 10:19:40 +0100 Subject: [PATCH] fix label truncation --- ckanext/odsh/public/odsh.css | 26 ++++++++++--------- .../odsh/templates/snippets/facet_list.html | 2 +- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/ckanext/odsh/public/odsh.css b/ckanext/odsh/public/odsh.css index 58fe5ad4..9ca7a5b1 100644 --- a/ckanext/odsh/public/odsh.css +++ b/ckanext/odsh/public/odsh.css @@ -145,10 +145,6 @@ input[type=radio], input[type=checkbox] { top: 0px; } -.nav-simple>li { - border-bottom: 0px; - padding: 15px 0px 15px 0px; -} @media (min-width: 768px){ [role=main], .main { @@ -234,9 +230,20 @@ input[type=radio], input[type=checkbox] { color: black; } +.nav-simple>li { + border-bottom: 0px; + padding: 15px 0px 0px 0px; + width: 193px; + white-space: nowrap; + display: flex; + justify-content: space-between; +} + .nav-item .facet_label { - display: block; - float: left; + flex:1; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; } .nav-item .facet_label a{ @@ -244,16 +251,11 @@ input[type=radio], input[type=checkbox] { } .nav-item .facet_count { - display: block; - float: right; + display: inline-block; background-color: white; padding: 0px 2px 0px 2px; } -.filter-checkbox { - -} - /* checkbox customize trick, see: https://stackoverflow.com/questions/24322599/css-why-cannot-change-checkbox-color-whatever-i-do */ .facet_label input[type=checkbox] { diff --git a/ckanext/odsh/templates/snippets/facet_list.html b/ckanext/odsh/templates/snippets/facet_list.html index 78e5d2c4..0fb68e1f 100644 --- a/ckanext/odsh/templates/snippets/facet_list.html +++ b/ckanext/odsh/templates/snippets/facet_list.html @@ -26,7 +26,7 @@ <input type="checkbox" {% if item.active %} checked {% endif %} class="filter-checkbox" id="check-{{ title.lower() }}-{{ loop.index }}"/> <label class="mylabel" for="check-{{ title.lower() }}-{{ loop.index }}"></label> <a href="{{ href }}" title="{{ label if label != label_truncated else '' }}"> - <span>{{ label_truncated }}</span> + <span>{{ label}}</span> </a> </div> <div class="facet_count"> -- GitLab