[#45910] fixed tooltip for not linked files

- https://community.openproject.org/work_packages/45910
- added min height to scrollable content in file picker
pull/11967/head
Eric Schubert 2 years ago
parent f88889489f
commit 1e151bffc2
No known key found for this signature in database
GPG Key ID: 1D346C019BD4BAA2
  1. 10
      frontend/src/app/shared/components/storages/file-picker-modal/file-picker-modal.component.ts
  2. 3
      frontend/src/global_styles/content/work_packages/shared/_file_picker.sass

@ -149,7 +149,7 @@ export class FilePickerModalComponent extends FilePickerBaseModalComponent {
this.isAlreadyLinked(file),
index === 0,
this.enterDirectoryCallback(file),
isDirectory(file) ? this.text.tooltip.alreadyLinkedDirectory : this.text.tooltip.alreadyLinkedFile,
this.tooltip(file),
{
selected: this.selection.has(file.id as string),
changeSelection: () => { this.changeSelection(file); },
@ -163,4 +163,12 @@ export class FilePickerModalComponent extends FilePickerBaseModalComponent {
return !!found;
}
private tooltip(file:IStorageFile):string|undefined {
if (!this.isAlreadyLinked(file)) {
return undefined;
}
return isDirectory(file) ? this.text.tooltip.alreadyLinkedDirectory : this.text.tooltip.alreadyLinkedFile;
}
}

@ -29,6 +29,9 @@
.op-file-picker
&--scrollable-content
overflow-y: auto
// If there a list in the content that provides tooltips on there items,
// we need enough space to display those tooltips
min-height: $spot-spacing-5
@media #{$spot-mq-mobile}
&.spot-modal

Loading…
Cancel
Save