|
|
|
@ -34,6 +34,7 @@ import {I18nService} from "core-app/modules/common/i18n/i18n.service"; |
|
|
|
|
import {WorkPackageResource} from "core-app/modules/hal/resources/work-package-resource"; |
|
|
|
|
import {HalResource} from "core-app/modules/hal/resources/hal-resource"; |
|
|
|
|
import {WorkPackageCacheService} from "core-components/work-packages/work-package-cache.service"; |
|
|
|
|
import {PreviewTriggerService} from "core-app/globals/global-listeners/preview-trigger.service"; |
|
|
|
|
|
|
|
|
|
@Component({ |
|
|
|
|
templateUrl: './wp-preview.modal.html', |
|
|
|
@ -52,7 +53,8 @@ export class WpPreviewModal extends OpModalComponent implements OnInit { |
|
|
|
|
readonly cdRef:ChangeDetectorRef, |
|
|
|
|
readonly i18n:I18nService, |
|
|
|
|
readonly wpCacheService:WorkPackageCacheService, |
|
|
|
|
readonly opModalService:OpModalService) { |
|
|
|
|
readonly opModalService:OpModalService, |
|
|
|
|
readonly previewTriggerService:PreviewTriggerService) { |
|
|
|
|
super(locals, cdRef, elementRef); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -65,6 +67,9 @@ export class WpPreviewModal extends OpModalComponent implements OnInit { |
|
|
|
|
.then((workPackage:WorkPackageResource) => { |
|
|
|
|
this.workPackage = workPackage; |
|
|
|
|
this.cdRef.detectChanges(); |
|
|
|
|
|
|
|
|
|
const modal = jQuery(this.elementRef.nativeElement).find('.preview-modal--container'); |
|
|
|
|
this.previewTriggerService.reposition(modal, this.locals.event.target); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|