Merge branch 'DSC-516-Style-New' of bitbucket.org:4Science/dspace-angular into DSC-516-Style-New

This commit is contained in:
Giuseppe Digilio
2022-05-30 17:25:59 +02:00
2 changed files with 14 additions and 1 deletions

View File

@@ -5,3 +5,7 @@
.btn:focus { .btn:focus {
box-shadow: none !important; box-shadow: none !important;
} }
.removeFaded {
position: inherit;
}

View File

@@ -108,14 +108,23 @@ export class TruncatablePartComponent implements AfterViewChecked, OnInit, OnDes
if (entry.children.length > 0) { if (entry.children.length > 0) {
if (entry.children[entry.children.length - 1].offsetHeight > entry.offsetHeight) { if (entry.children[entry.children.length - 1].offsetHeight > entry.offsetHeight) {
entry.classList.add('truncated'); entry.classList.add('truncated');
entry.classList.remove('removeFaded');
} else { } else {
entry.classList.remove('truncated'); entry.classList.remove('truncated');
entry.classList.add('removeFaded');
} }
} else { } else {
entry.classList.add('truncated'); if (entry.innerText.length > 0) {
entry.classList.add('truncated');
entry.classList.remove('removeFaded');
} else {
entry.classList.remove('truncated');
entry.classList.add('removeFaded');
}
} }
} else { } else {
entry.classList.remove('truncated'); entry.classList.remove('truncated');
entry.classList.add('removeFaded');
} }
} }