diff --git a/client/src/app/core/ui-services/projection-dialog.service.ts b/client/src/app/core/ui-services/projection-dialog.service.ts index 5e26b3863..8cc28c57d 100644 --- a/client/src/app/core/ui-services/projection-dialog.service.ts +++ b/client/src/app/core/ui-services/projection-dialog.service.ts @@ -47,8 +47,14 @@ export class ProjectionDialogService { }); const response = await dialogRef.afterClosed().toPromise(); if (response) { - const [projectors, projectorElement]: ProjectionDialogReturnType = response; - this.projectorService.projectOnMultiple(projectors, projectorElement); + const [action, projectors, projectorElement]: ProjectionDialogReturnType = response; + if (action === 'project') { + this.projectorService.projectOnMultiple(projectors, projectorElement); + } else if (action === 'addToPreview') { + projectors.forEach(projector => { + this.projectorService.addElementToPreview(projector, projectorElement); + }); + } } } } diff --git a/client/src/app/shared/components/projection-dialog/projection-dialog.component.html b/client/src/app/shared/components/projection-dialog/projection-dialog.component.html index c2584c7e6..baceacb66 100644 --- a/client/src/app/shared/components/projection-dialog/projection-dialog.component.html +++ b/client/src/app/shared/components/projection-dialog/projection-dialog.component.html @@ -37,6 +37,7 @@ - + + diff --git a/client/src/app/shared/components/projection-dialog/projection-dialog.component.ts b/client/src/app/shared/components/projection-dialog/projection-dialog.component.ts index dbbd05d55..f40ef95a9 100644 --- a/client/src/app/shared/components/projection-dialog/projection-dialog.component.ts +++ b/client/src/app/shared/components/projection-dialog/projection-dialog.component.ts @@ -14,7 +14,7 @@ import { SlideOptions } from 'app/site/base/slide-options'; -export type ProjectionDialogReturnType = [Projector[], IdentifiableProjectorElement]; +export type ProjectionDialogReturnType = ['project' | 'addToPreview', Projector[], IdentifiableProjectorElement]; /** */ @@ -85,10 +85,16 @@ export class ProjectionDialogComponent { return isSlideChoiceOption(option); } - public onOk(): void { + public onProject(): void { let element = this.projectorElementBuildDescriptor.getBasicProjectorElement(this.optionValues); element = { ...element, ...this.optionValues }; - this.dialogRef.close([this.selectedProjectors, element]); + this.dialogRef.close(['project', this.selectedProjectors, element]); + } + + public onAddToPreview(): void { + let element = this.projectorElementBuildDescriptor.getBasicProjectorElement(this.optionValues); + element = { ...element, ...this.optionValues }; + this.dialogRef.close(['addToPreview', this.selectedProjectors, element]); } public onCancel(): void { diff --git a/client/src/app/site/projector/components/projector-detail/projector-detail.component.html b/client/src/app/site/projector/components/projector-detail/projector-detail.component.html index 54a16d2a2..9a6f74e74 100644 --- a/client/src/app/site/projector/components/projector-detail/projector-detail.component.html +++ b/client/src/app/site/projector/components/projector-detail/projector-detail.component.html @@ -50,9 +50,9 @@ -
+
History
-

+

{{ getSlideTitle(elements[0]) }}

@@ -143,7 +143,7 @@
-
+
Queue