Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

[#45910] fixed tooltip for not linked files

Eric Schubert1e151bffc227
diff --git a/frontend/src/app/shared/components/storages/file-picker-modal/file-picker-modal.component.ts b/frontend/src/app/shared/components/storages/file-picker-modal/file-picker-modal.component.ts
index 0a8313a1176..7e5af3ee05e 100644
--- a/frontend/src/app/shared/components/storages/file-picker-modal/file-picker-modal.component.ts
+++ b/frontend/src/app/shared/components/storages/file-picker-modal/file-picker-modal.component.ts
@@ -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;
+ }
}
diff --git a/frontend/src/global_styles/content/work_packages/shared/_file_picker.sass b/frontend/src/global_styles/content/work_packages/shared/_file_picker.sass
index 897d2198156..3063f960f3c 100644
--- a/frontend/src/global_styles/content/work_packages/shared/_file_picker.sass
+++ b/frontend/src/global_styles/content/work_packages/shared/_file_picker.sass
@@ -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