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

[37301] Make datepicker modal a transparent modal (#9315)

Oliver Güntherdeacefe08a50
diff --git a/frontend/src/app/modules/fields/edit/field-types/combined-date-edit-field.component.ts b/frontend/src/app/modules/fields/edit/field-types/combined-date-edit-field.component.ts
index fac6412bd89..7d78841ec1b 100644
--- a/frontend/src/app/modules/fields/edit/field-types/combined-date-edit-field.component.ts
+++ b/frontend/src/app/modules/fields/edit/field-types/combined-date-edit-field.component.ts
@@ -78,7 +78,7 @@ export class CombinedDateEditFieldComponent extends DateEditFieldComponent imple
private showDatePickerModal():void {
const modal = this.modal = this
.opModalService
- .show(DatePickerModal, this.injector, { changeset: this.change, fieldName: this.name });
+ .show(DatePickerModal, this.injector, { changeset: this.change, fieldName: this.name }, true);
setTimeout(() => {
const modalElement = jQuery(modal.elementRef.nativeElement).find('.datepicker-modal');
diff --git a/frontend/src/app/modules/modal/modal-overlay.sass b/frontend/src/app/modules/modal/modal-overlay.sass
index 4dc349273bf..f55178f26a9 100644
--- a/frontend/src/app/modules/modal/modal-overlay.sass
+++ b/frontend/src/app/modules/modal/modal-overlay.sass
@@ -13,6 +13,6 @@
&_active
display: flex
- // TODO: Remove this once the wp preview is not relevant anymore
&_not-full-screen
+ background: transparent
position: relative
diff --git a/frontend/src/app/modules/modal/modal.service.ts b/frontend/src/app/modules/modal/modal.service.ts
index f2e6fea381a..2cb34c94cae 100644
--- a/frontend/src/app/modules/modal/modal.service.ts
+++ b/frontend/src/app/modules/modal/modal.service.ts
@@ -70,12 +70,13 @@ export class OpModalService {
* @param injector The injector to pass into the component. Ensure this is the hierarchical injector if needed.
* Can be passed 'global' to take the default (global!) injector of this service.
* @param locals A map to be injected via token into the component.
+ * @param notFullScreen Whether the modal is treated as non-overlay
*/
public show<T extends OpModalComponent>(
modal:ComponentType<T>,
injector:Injector|'global',
- locals:any = {},
- notFullScreen = false, // TODO: Remove this option once `WpPreviewModal` is not a modal anymore
+ locals:Record<string, unknown> = {},
+ notFullScreen = false,
):T {
this.close();
@@ -136,7 +137,7 @@ export class OpModalService {
* This allows callers to pass data into the newly created modal.
*
*/
- private injectorFor(injector:Injector, data:any) {
+ private injectorFor(injector:Injector, data:Record<string, unknown>) {
const injectorTokens = new WeakMap();
// Pass the service because otherwise we're getting a cyclic dependency between the portal
// host service and the bound portal