Merge pull request #4885 from GabrielInTheWorld/saveTheMember
Exports the settings for the dialogs to a separate file.
This commit is contained in:
commit
2be3fa1f08
@ -1,6 +1,7 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { MatDialog } from '@angular/material/dialog';
|
import { MatDialog } from '@angular/material/dialog';
|
||||||
|
|
||||||
|
import { mediumDialogSettings } from 'app/shared/utils/dialog-settings';
|
||||||
import {
|
import {
|
||||||
ChoiceAnswer,
|
ChoiceAnswer,
|
||||||
ChoiceDialogComponent,
|
ChoiceDialogComponent,
|
||||||
@ -42,9 +43,7 @@ export class ChoiceService {
|
|||||||
clearChoice?: string
|
clearChoice?: string
|
||||||
): Promise<ChoiceAnswer> {
|
): Promise<ChoiceAnswer> {
|
||||||
const dialogRef = this.dialog.open(ChoiceDialogComponent, {
|
const dialogRef = this.dialog.open(ChoiceDialogComponent, {
|
||||||
maxWidth: '90vw',
|
...mediumDialogSettings,
|
||||||
maxHeight: '90vh',
|
|
||||||
disableClose: true,
|
|
||||||
data: {
|
data: {
|
||||||
title: title,
|
title: title,
|
||||||
choices: choices,
|
choices: choices,
|
||||||
|
@ -5,6 +5,7 @@ import { MatDialog } from '@angular/material';
|
|||||||
import { BehaviorSubject } from 'rxjs';
|
import { BehaviorSubject } from 'rxjs';
|
||||||
|
|
||||||
import { MediafileRepositoryService } from 'app/core/repositories/mediafiles/mediafile-repository.service';
|
import { MediafileRepositoryService } from 'app/core/repositories/mediafiles/mediafile-repository.service';
|
||||||
|
import { mediumDialogSettings } from 'app/shared/utils/dialog-settings';
|
||||||
import { ViewMediafile } from 'app/site/mediafiles/models/view-mediafile';
|
import { ViewMediafile } from 'app/site/mediafiles/models/view-mediafile';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@ -51,11 +52,7 @@ export class AttachmentControlComponent implements OnInit, ControlValueAccessor
|
|||||||
* @param dialog the dialog to open
|
* @param dialog the dialog to open
|
||||||
*/
|
*/
|
||||||
public openUploadDialog(dialog: TemplateRef<string>): void {
|
public openUploadDialog(dialog: TemplateRef<string>): void {
|
||||||
this.dialogService.open(dialog, {
|
this.dialogService.open(dialog, mediumDialogSettings);
|
||||||
width: '750px',
|
|
||||||
maxWidth: '90vw',
|
|
||||||
maxHeight: '90vh'
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -9,6 +9,7 @@ import { Subscription } from 'rxjs';
|
|||||||
|
|
||||||
import { NotifyResponse, NotifyService } from 'app/core/core-services/notify.service';
|
import { NotifyResponse, NotifyService } from 'app/core/core-services/notify.service';
|
||||||
import { OperatorService } from 'app/core/core-services/operator.service';
|
import { OperatorService } from 'app/core/core-services/operator.service';
|
||||||
|
import { mediumDialogSettings } from 'app/shared/utils/dialog-settings';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* All player types.
|
* All player types.
|
||||||
@ -602,10 +603,7 @@ export class CopyrightSignComponent {
|
|||||||
|
|
||||||
if (this.clickCounter === 5) {
|
if (this.clickCounter === 5) {
|
||||||
this.clickCounter = 0;
|
this.clickCounter = 0;
|
||||||
this.dialog.open(C4DialogComponent, {
|
this.dialog.open(C4DialogComponent, mediumDialogSettings);
|
||||||
width: '550px',
|
|
||||||
disableClose: true
|
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
this.clickTimeout = <any>setTimeout(() => {
|
this.clickTimeout = <any>setTimeout(() => {
|
||||||
this.clickCounter = 0;
|
this.clickCounter = 0;
|
||||||
|
31
client/src/app/shared/utils/dialog-settings.ts
Normal file
31
client/src/app/shared/utils/dialog-settings.ts
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
/**
|
||||||
|
* General settings all dialogs are using.
|
||||||
|
*/
|
||||||
|
const generalSettings = { disableClose: true, maxWidth: '90vw', maxHeight: '90vh' };
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Settings to display a large (wide) dialog.
|
||||||
|
* `width='1100px'`
|
||||||
|
*/
|
||||||
|
export const largeDialogSettings = {
|
||||||
|
width: '1100px',
|
||||||
|
...generalSettings
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Settings to display a medium dialog.
|
||||||
|
* `width='750px'`
|
||||||
|
*/
|
||||||
|
export const mediumDialogSettings = {
|
||||||
|
width: '750px',
|
||||||
|
...generalSettings
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Settings to display a small dialog. Useful for info-dialogs.
|
||||||
|
* `width='400px'`
|
||||||
|
*/
|
||||||
|
export const infoDialogSettings = {
|
||||||
|
width: '400px',
|
||||||
|
...generalSettings
|
||||||
|
};
|
@ -22,6 +22,7 @@ import { PdfDocumentService } from 'app/core/ui-services/pdf-document.service';
|
|||||||
import { PromptService } from 'app/core/ui-services/prompt.service';
|
import { PromptService } from 'app/core/ui-services/prompt.service';
|
||||||
import { ViewportService } from 'app/core/ui-services/viewport.service';
|
import { ViewportService } from 'app/core/ui-services/viewport.service';
|
||||||
import { ColumnRestriction } from 'app/shared/components/list-view-table/list-view-table.component';
|
import { ColumnRestriction } from 'app/shared/components/list-view-table/list-view-table.component';
|
||||||
|
import { infoDialogSettings } from 'app/shared/utils/dialog-settings';
|
||||||
import { BaseListViewComponent } from 'app/site/base/base-list-view';
|
import { BaseListViewComponent } from 'app/site/base/base-list-view';
|
||||||
import { ProjectorElementBuildDeskriptor } from 'app/site/base/projectable';
|
import { ProjectorElementBuildDeskriptor } from 'app/site/base/projectable';
|
||||||
import { ViewTopic } from 'app/site/topics/models/view-topic';
|
import { ViewTopic } from 'app/site/topics/models/view-topic';
|
||||||
@ -190,11 +191,7 @@ export class AgendaListComponent extends BaseListViewComponent<ViewItem> impleme
|
|||||||
if (this.isMultiSelect || !this.canManage) {
|
if (this.isMultiSelect || !this.canManage) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const dialogRef = this.dialog.open(ItemInfoDialogComponent, {
|
const dialogRef = this.dialog.open(ItemInfoDialogComponent, infoDialogSettings);
|
||||||
width: '400px',
|
|
||||||
data: item,
|
|
||||||
disableClose: true
|
|
||||||
});
|
|
||||||
|
|
||||||
dialogRef.afterClosed().subscribe(result => {
|
dialogRef.afterClosed().subscribe(result => {
|
||||||
if (result) {
|
if (result) {
|
||||||
|
@ -10,6 +10,7 @@ import { OperatorService } from 'app/core/core-services/operator.service';
|
|||||||
import { AssignmentRepositoryService } from 'app/core/repositories/assignments/assignment-repository.service';
|
import { AssignmentRepositoryService } from 'app/core/repositories/assignments/assignment-repository.service';
|
||||||
import { CalculablePollKey, MajorityMethod } from 'app/core/ui-services/poll.service';
|
import { CalculablePollKey, MajorityMethod } from 'app/core/ui-services/poll.service';
|
||||||
import { PromptService } from 'app/core/ui-services/prompt.service';
|
import { PromptService } from 'app/core/ui-services/prompt.service';
|
||||||
|
import { mediumDialogSettings } from 'app/shared/utils/dialog-settings';
|
||||||
import { BaseViewComponent } from 'app/site/base/base-view';
|
import { BaseViewComponent } from 'app/site/base/base-view';
|
||||||
import { AssignmentPollDialogComponent } from '../assignment-poll-dialog/assignment-poll-dialog.component';
|
import { AssignmentPollDialogComponent } from '../assignment-poll-dialog/assignment-poll-dialog.component';
|
||||||
import { AssignmentPollPdfService } from '../../services/assignment-poll-pdf.service';
|
import { AssignmentPollPdfService } from '../../services/assignment-poll-pdf.service';
|
||||||
@ -197,10 +198,7 @@ export class AssignmentPollComponent extends BaseViewComponent implements OnInit
|
|||||||
const dialogRef = this.dialog.open(AssignmentPollDialogComponent, {
|
const dialogRef = this.dialog.open(AssignmentPollDialogComponent, {
|
||||||
// TODO deep copy of this.poll (JSON parse is ugly workaround) or sending just copy of the options
|
// TODO deep copy of this.poll (JSON parse is ugly workaround) or sending just copy of the options
|
||||||
data: this.poll.copy(),
|
data: this.poll.copy(),
|
||||||
maxHeight: '90vh',
|
...mediumDialogSettings
|
||||||
width: '600px',
|
|
||||||
maxWidth: '90vw',
|
|
||||||
disableClose: true
|
|
||||||
});
|
});
|
||||||
dialogRef.afterClosed().subscribe(result => {
|
dialogRef.afterClosed().subscribe(result => {
|
||||||
if (result) {
|
if (result) {
|
||||||
|
@ -25,6 +25,7 @@ import { MediaManageService } from 'app/core/ui-services/media-manage.service';
|
|||||||
import { PromptService } from 'app/core/ui-services/prompt.service';
|
import { PromptService } from 'app/core/ui-services/prompt.service';
|
||||||
import { ViewportService } from 'app/core/ui-services/viewport.service';
|
import { ViewportService } from 'app/core/ui-services/viewport.service';
|
||||||
import { Mediafile } from 'app/shared/models/mediafiles/mediafile';
|
import { Mediafile } from 'app/shared/models/mediafiles/mediafile';
|
||||||
|
import { infoDialogSettings } from 'app/shared/utils/dialog-settings';
|
||||||
import { BaseViewComponent } from 'app/site/base/base-view';
|
import { BaseViewComponent } from 'app/site/base/base-view';
|
||||||
import { ViewMediafile } from 'app/site/mediafiles/models/view-mediafile';
|
import { ViewMediafile } from 'app/site/mediafiles/models/view-mediafile';
|
||||||
import { ViewGroup } from 'app/site/users/models/view-group';
|
import { ViewGroup } from 'app/site/users/models/view-group';
|
||||||
@ -306,12 +307,7 @@ export class MediafileListComponent extends BaseViewComponent implements OnInit,
|
|||||||
access_groups_id: [file.access_groups_id]
|
access_groups_id: [file.access_groups_id]
|
||||||
});
|
});
|
||||||
|
|
||||||
const dialogRef = this.dialog.open(this.fileEditDialog, {
|
const dialogRef = this.dialog.open(this.fileEditDialog, infoDialogSettings);
|
||||||
width: '400px',
|
|
||||||
maxWidth: '90vw',
|
|
||||||
maxHeight: '90vh',
|
|
||||||
disableClose: true
|
|
||||||
});
|
|
||||||
|
|
||||||
dialogRef.keydownEvents().subscribe((event: KeyboardEvent) => {
|
dialogRef.keydownEvents().subscribe((event: KeyboardEvent) => {
|
||||||
if (event.key === 'Enter' && event.shiftKey && this.fileEditForm.valid) {
|
if (event.key === 'Enter' && event.shiftKey && this.fileEditForm.valid) {
|
||||||
@ -410,9 +406,7 @@ export class MediafileListComponent extends BaseViewComponent implements OnInit,
|
|||||||
|
|
||||||
public createNewFolder(templateRef: TemplateRef<string>): void {
|
public createNewFolder(templateRef: TemplateRef<string>): void {
|
||||||
this.newDirectoryForm.reset();
|
this.newDirectoryForm.reset();
|
||||||
const dialogRef = this.dialog.open(templateRef, {
|
const dialogRef = this.dialog.open(templateRef, infoDialogSettings);
|
||||||
width: '400px'
|
|
||||||
});
|
|
||||||
|
|
||||||
dialogRef.afterClosed().subscribe(result => {
|
dialogRef.afterClosed().subscribe(result => {
|
||||||
if (result) {
|
if (result) {
|
||||||
@ -428,9 +422,7 @@ export class MediafileListComponent extends BaseViewComponent implements OnInit,
|
|||||||
|
|
||||||
public move(templateRef: TemplateRef<string>, mediafile: ViewMediafile): void {
|
public move(templateRef: TemplateRef<string>, mediafile: ViewMediafile): void {
|
||||||
this.newDirectoryForm.reset();
|
this.newDirectoryForm.reset();
|
||||||
const dialogRef = this.dialog.open(templateRef, {
|
const dialogRef = this.dialog.open(templateRef, infoDialogSettings);
|
||||||
width: '400px'
|
|
||||||
});
|
|
||||||
|
|
||||||
dialogRef.afterClosed().subscribe(result => {
|
dialogRef.afterClosed().subscribe(result => {
|
||||||
if (result) {
|
if (result) {
|
||||||
|
@ -12,6 +12,7 @@ import { OperatorService } from 'app/core/core-services/operator.service';
|
|||||||
import { CategoryRepositoryService } from 'app/core/repositories/motions/category-repository.service';
|
import { CategoryRepositoryService } from 'app/core/repositories/motions/category-repository.service';
|
||||||
import { MotionRepositoryService } from 'app/core/repositories/motions/motion-repository.service';
|
import { MotionRepositoryService } from 'app/core/repositories/motions/motion-repository.service';
|
||||||
import { PromptService } from 'app/core/ui-services/prompt.service';
|
import { PromptService } from 'app/core/ui-services/prompt.service';
|
||||||
|
import { infoDialogSettings } from 'app/shared/utils/dialog-settings';
|
||||||
import { BaseViewComponent } from 'app/site/base/base-view';
|
import { BaseViewComponent } from 'app/site/base/base-view';
|
||||||
import { ViewCategory } from 'app/site/motions/models/view-category';
|
import { ViewCategory } from 'app/site/motions/models/view-category';
|
||||||
import { ViewMotion } from 'app/site/motions/models/view-motion';
|
import { ViewMotion } from 'app/site/motions/models/view-motion';
|
||||||
@ -198,12 +199,7 @@ export class CategoryDetailComponent extends BaseViewComponent implements OnInit
|
|||||||
name: [this.selectedCategory.name, Validators.required]
|
name: [this.selectedCategory.name, Validators.required]
|
||||||
});
|
});
|
||||||
|
|
||||||
this.dialog.open(this.editDialog, {
|
this.dialog.open(this.editDialog, infoDialogSettings);
|
||||||
width: '400px',
|
|
||||||
maxWidth: '90vw',
|
|
||||||
maxHeight: '90vh',
|
|
||||||
disableClose: true
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -13,6 +13,7 @@ import { MotionBlockRepositoryService } from 'app/core/repositories/motions/moti
|
|||||||
import { MotionRepositoryService } from 'app/core/repositories/motions/motion-repository.service';
|
import { MotionRepositoryService } from 'app/core/repositories/motions/motion-repository.service';
|
||||||
import { PromptService } from 'app/core/ui-services/prompt.service';
|
import { PromptService } from 'app/core/ui-services/prompt.service';
|
||||||
import { MotionBlock } from 'app/shared/models/motions/motion-block';
|
import { MotionBlock } from 'app/shared/models/motions/motion-block';
|
||||||
|
import { infoDialogSettings } from 'app/shared/utils/dialog-settings';
|
||||||
import { BaseViewComponent } from 'app/site/base/base-view';
|
import { BaseViewComponent } from 'app/site/base/base-view';
|
||||||
import { ViewMotion } from 'app/site/motions/models/view-motion';
|
import { ViewMotion } from 'app/site/motions/models/view-motion';
|
||||||
import { ViewMotionBlock } from 'app/site/motions/models/view-motion-block';
|
import { ViewMotionBlock } from 'app/site/motions/models/view-motion-block';
|
||||||
@ -219,12 +220,7 @@ export class MotionBlockDetailComponent extends BaseViewComponent implements OnI
|
|||||||
internal: [this.block.internal]
|
internal: [this.block.internal]
|
||||||
});
|
});
|
||||||
|
|
||||||
const dialogRef = this.dialog.open(this.editDialog, {
|
const dialogRef = this.dialog.open(this.editDialog, infoDialogSettings);
|
||||||
width: '400px',
|
|
||||||
maxWidth: '90vw',
|
|
||||||
maxHeight: '90vh',
|
|
||||||
disableClose: true
|
|
||||||
});
|
|
||||||
|
|
||||||
dialogRef.keydownEvents().subscribe((event: KeyboardEvent) => {
|
dialogRef.keydownEvents().subscribe((event: KeyboardEvent) => {
|
||||||
if (event.key === 'Enter' && event.shiftKey) {
|
if (event.key === 'Enter' && event.shiftKey) {
|
||||||
|
@ -10,6 +10,7 @@ import { ConfigService } from 'app/core/ui-services/config.service';
|
|||||||
import { DiffService, LineRange } from 'app/core/ui-services/diff.service';
|
import { DiffService, LineRange } from 'app/core/ui-services/diff.service';
|
||||||
import { PromptService } from 'app/core/ui-services/prompt.service';
|
import { PromptService } from 'app/core/ui-services/prompt.service';
|
||||||
import { ViewUnifiedChange, ViewUnifiedChangeType } from 'app/shared/models/motions/view-unified-change';
|
import { ViewUnifiedChange, ViewUnifiedChangeType } from 'app/shared/models/motions/view-unified-change';
|
||||||
|
import { mediumDialogSettings } from 'app/shared/utils/dialog-settings';
|
||||||
import { getRecommendationTypeName } from 'app/shared/utils/recommendation-type-names';
|
import { getRecommendationTypeName } from 'app/shared/utils/recommendation-type-names';
|
||||||
import { BaseViewComponent } from 'app/site/base/base-view';
|
import { BaseViewComponent } from 'app/site/base/base-view';
|
||||||
import { LineNumberingMode, ViewMotion } from 'app/site/motions/models/view-motion';
|
import { LineNumberingMode, ViewMotion } from 'app/site/motions/models/view-motion';
|
||||||
@ -324,12 +325,8 @@ export class MotionDetailDiffComponent extends BaseViewComponent implements Afte
|
|||||||
changeRecommendation: reco
|
changeRecommendation: reco
|
||||||
};
|
};
|
||||||
this.dialogService.open(MotionChangeRecommendationDialogComponent, {
|
this.dialogService.open(MotionChangeRecommendationDialogComponent, {
|
||||||
height: '600px',
|
...mediumDialogSettings,
|
||||||
width: '800px',
|
data: data
|
||||||
maxHeight: '90vh',
|
|
||||||
maxWidth: '90vw',
|
|
||||||
data: data,
|
|
||||||
disableClose: true
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -343,12 +340,8 @@ export class MotionDetailDiffComponent extends BaseViewComponent implements Afte
|
|||||||
changeRecommendation: reco
|
changeRecommendation: reco
|
||||||
};
|
};
|
||||||
this.dialogService.open(MotionTitleChangeRecommendationDialogComponent, {
|
this.dialogService.open(MotionTitleChangeRecommendationDialogComponent, {
|
||||||
height: '600px',
|
...mediumDialogSettings,
|
||||||
width: '800px',
|
data: data
|
||||||
maxHeight: '90vh',
|
|
||||||
maxWidth: '90vw',
|
|
||||||
data: data,
|
|
||||||
disableClose: true
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,6 +30,7 @@ import { ViewportService } from 'app/core/ui-services/viewport.service';
|
|||||||
import { Mediafile } from 'app/shared/models/mediafiles/mediafile';
|
import { Mediafile } from 'app/shared/models/mediafiles/mediafile';
|
||||||
import { Motion } from 'app/shared/models/motions/motion';
|
import { Motion } from 'app/shared/models/motions/motion';
|
||||||
import { ViewUnifiedChange } from 'app/shared/models/motions/view-unified-change';
|
import { ViewUnifiedChange } from 'app/shared/models/motions/view-unified-change';
|
||||||
|
import { infoDialogSettings, mediumDialogSettings } from 'app/shared/utils/dialog-settings';
|
||||||
import { BaseViewComponent } from 'app/site/base/base-view';
|
import { BaseViewComponent } from 'app/site/base/base-view';
|
||||||
import { CreateMotion } from 'app/site/motions/models/create-motion';
|
import { CreateMotion } from 'app/site/motions/models/create-motion';
|
||||||
import { ViewCategory } from 'app/site/motions/models/view-category';
|
import { ViewCategory } from 'app/site/motions/models/view-category';
|
||||||
@ -1037,12 +1038,8 @@ export class MotionDetailComponent extends BaseViewComponent implements OnInit,
|
|||||||
)
|
)
|
||||||
};
|
};
|
||||||
this.dialogService.open(MotionChangeRecommendationDialogComponent, {
|
this.dialogService.open(MotionChangeRecommendationDialogComponent, {
|
||||||
height: '600px',
|
...mediumDialogSettings,
|
||||||
width: '800px',
|
data: data
|
||||||
maxHeight: '90vh',
|
|
||||||
maxWidth: '90vw',
|
|
||||||
data: data,
|
|
||||||
disableClose: true
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1059,11 +1056,8 @@ export class MotionDetailComponent extends BaseViewComponent implements OnInit,
|
|||||||
)
|
)
|
||||||
};
|
};
|
||||||
this.dialogService.open(MotionTitleChangeRecommendationDialogComponent, {
|
this.dialogService.open(MotionTitleChangeRecommendationDialogComponent, {
|
||||||
width: '400px',
|
...infoDialogSettings,
|
||||||
maxHeight: '90vh',
|
data: data
|
||||||
maxWidth: '90vw',
|
|
||||||
data: data,
|
|
||||||
disableClose: true
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,6 +8,7 @@ import { MotionRepositoryService } from 'app/core/repositories/motions/motion-re
|
|||||||
import { CalculablePollKey } from 'app/core/ui-services/poll.service';
|
import { CalculablePollKey } from 'app/core/ui-services/poll.service';
|
||||||
import { PromptService } from 'app/core/ui-services/prompt.service';
|
import { PromptService } from 'app/core/ui-services/prompt.service';
|
||||||
import { MotionPoll } from 'app/shared/models/motions/motion-poll';
|
import { MotionPoll } from 'app/shared/models/motions/motion-poll';
|
||||||
|
import { infoDialogSettings } from 'app/shared/utils/dialog-settings';
|
||||||
import { LocalPermissionsService } from 'app/site/motions/services/local-permissions.service';
|
import { LocalPermissionsService } from 'app/site/motions/services/local-permissions.service';
|
||||||
import { MotionPollPdfService } from 'app/site/motions/services/motion-poll-pdf.service';
|
import { MotionPollPdfService } from 'app/site/motions/services/motion-poll-pdf.service';
|
||||||
import { MotionPollService } from 'app/site/motions/services/motion-poll.service';
|
import { MotionPollService } from 'app/site/motions/services/motion-poll.service';
|
||||||
@ -184,9 +185,7 @@ export class MotionPollComponent implements OnInit {
|
|||||||
public editPoll(): void {
|
public editPoll(): void {
|
||||||
const dialogRef = this.dialog.open(MotionPollDialogComponent, {
|
const dialogRef = this.dialog.open(MotionPollDialogComponent, {
|
||||||
data: { ...this.poll },
|
data: { ...this.poll },
|
||||||
maxHeight: '90vh',
|
...infoDialogSettings
|
||||||
minWidth: '250px',
|
|
||||||
disableClose: true
|
|
||||||
});
|
});
|
||||||
dialogRef.afterClosed().subscribe(result => {
|
dialogRef.afterClosed().subscribe(result => {
|
||||||
if (result) {
|
if (result) {
|
||||||
|
@ -16,6 +16,7 @@ import { TagRepositoryService } from 'app/core/repositories/tags/tag-repository.
|
|||||||
import { ConfigService } from 'app/core/ui-services/config.service';
|
import { ConfigService } from 'app/core/ui-services/config.service';
|
||||||
import { PdfError } from 'app/core/ui-services/pdf-document.service';
|
import { PdfError } from 'app/core/ui-services/pdf-document.service';
|
||||||
import { ColumnRestriction } from 'app/shared/components/list-view-table/list-view-table.component';
|
import { ColumnRestriction } from 'app/shared/components/list-view-table/list-view-table.component';
|
||||||
|
import { infoDialogSettings, largeDialogSettings } from 'app/shared/utils/dialog-settings';
|
||||||
import { BaseListViewComponent } from 'app/site/base/base-list-view';
|
import { BaseListViewComponent } from 'app/site/base/base-list-view';
|
||||||
import { ViewCategory } from 'app/site/motions/models/view-category';
|
import { ViewCategory } from 'app/site/motions/models/view-category';
|
||||||
import { ViewMotion } from 'app/site/motions/models/view-motion';
|
import { ViewMotion } from 'app/site/motions/models/view-motion';
|
||||||
@ -300,9 +301,7 @@ export class MotionListComponent extends BaseListViewComponent<ViewMotion> imple
|
|||||||
*/
|
*/
|
||||||
public openExportDialog(): void {
|
public openExportDialog(): void {
|
||||||
const exportDialogRef = this.dialog.open(MotionExportDialogComponent, {
|
const exportDialogRef = this.dialog.open(MotionExportDialogComponent, {
|
||||||
width: '1100px',
|
...largeDialogSettings,
|
||||||
maxWidth: '90vw',
|
|
||||||
maxHeight: '90vh',
|
|
||||||
data: this.dataSource
|
data: this.dataSource
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -447,12 +446,7 @@ export class MotionListComponent extends BaseListViewComponent<ViewMotion> imple
|
|||||||
// Copies the interface to check, if changes were made.
|
// Copies the interface to check, if changes were made.
|
||||||
const copyDialog = { ...this.infoDialog };
|
const copyDialog = { ...this.infoDialog };
|
||||||
|
|
||||||
const dialogRef = this.dialog.open(this.motionInfoDialog, {
|
const dialogRef = this.dialog.open(this.motionInfoDialog, infoDialogSettings);
|
||||||
width: '400px',
|
|
||||||
maxWidth: '90vw',
|
|
||||||
maxHeight: '90vh',
|
|
||||||
disableClose: true
|
|
||||||
});
|
|
||||||
|
|
||||||
dialogRef.keydownEvents().subscribe((event: KeyboardEvent) => {
|
dialogRef.keydownEvents().subscribe((event: KeyboardEvent) => {
|
||||||
if (event.key === 'Enter' && event.shiftKey) {
|
if (event.key === 'Enter' && event.shiftKey) {
|
||||||
|
@ -13,6 +13,7 @@ import { StateRepositoryService } from 'app/core/repositories/motions/state-repo
|
|||||||
import { WorkflowRepositoryService } from 'app/core/repositories/motions/workflow-repository.service';
|
import { WorkflowRepositoryService } from 'app/core/repositories/motions/workflow-repository.service';
|
||||||
import { PromptService } from 'app/core/ui-services/prompt.service';
|
import { PromptService } from 'app/core/ui-services/prompt.service';
|
||||||
import { MergeAmendment, State } from 'app/shared/models/motions/state';
|
import { MergeAmendment, State } from 'app/shared/models/motions/state';
|
||||||
|
import { infoDialogSettings } from 'app/shared/utils/dialog-settings';
|
||||||
import { BaseViewComponent } from 'app/site/base/base-view';
|
import { BaseViewComponent } from 'app/site/base/base-view';
|
||||||
import { ViewState } from 'app/site/motions/models/view-state';
|
import { ViewState } from 'app/site/motions/models/view-state';
|
||||||
import { ViewWorkflow } from 'app/site/motions/models/view-workflow';
|
import { ViewWorkflow } from 'app/site/motions/models/view-workflow';
|
||||||
@ -344,11 +345,7 @@ export class WorkflowDetailComponent extends BaseViewComponent implements OnInit
|
|||||||
deletable: deletable
|
deletable: deletable
|
||||||
};
|
};
|
||||||
|
|
||||||
const dialogRef = this.dialog.open(this.workflowDialog, {
|
const dialogRef = this.dialog.open(this.workflowDialog, infoDialogSettings);
|
||||||
maxHeight: '90vh',
|
|
||||||
width: '400px',
|
|
||||||
maxWidth: '90vw'
|
|
||||||
});
|
|
||||||
|
|
||||||
return dialogRef.afterClosed();
|
return dialogRef.afterClosed();
|
||||||
}
|
}
|
||||||
|
@ -10,6 +10,7 @@ import { StorageService } from 'app/core/core-services/storage.service';
|
|||||||
import { WorkflowRepositoryService } from 'app/core/repositories/motions/workflow-repository.service';
|
import { WorkflowRepositoryService } from 'app/core/repositories/motions/workflow-repository.service';
|
||||||
import { PromptService } from 'app/core/ui-services/prompt.service';
|
import { PromptService } from 'app/core/ui-services/prompt.service';
|
||||||
import { Workflow } from 'app/shared/models/motions/workflow';
|
import { Workflow } from 'app/shared/models/motions/workflow';
|
||||||
|
import { infoDialogSettings } from 'app/shared/utils/dialog-settings';
|
||||||
import { BaseListViewComponent } from 'app/site/base/base-list-view';
|
import { BaseListViewComponent } from 'app/site/base/base-list-view';
|
||||||
import { ViewWorkflow } from 'app/site/motions/models/view-workflow';
|
import { ViewWorkflow } from 'app/site/motions/models/view-workflow';
|
||||||
|
|
||||||
@ -76,9 +77,7 @@ export class WorkflowListComponent extends BaseListViewComponent<ViewWorkflow> i
|
|||||||
*/
|
*/
|
||||||
public onNewButton(templateRef: TemplateRef<string>): void {
|
public onNewButton(templateRef: TemplateRef<string>): void {
|
||||||
this.newWorkflowTitle = '';
|
this.newWorkflowTitle = '';
|
||||||
const dialogRef = this.dialog.open(templateRef, {
|
const dialogRef = this.dialog.open(templateRef, infoDialogSettings);
|
||||||
width: '400px'
|
|
||||||
});
|
|
||||||
|
|
||||||
dialogRef.afterClosed().subscribe(result => {
|
dialogRef.afterClosed().subscribe(result => {
|
||||||
if (result) {
|
if (result) {
|
||||||
|
@ -18,6 +18,7 @@ import { DurationService } from 'app/core/ui-services/duration.service';
|
|||||||
import { Countdown } from 'app/shared/models/core/countdown';
|
import { Countdown } from 'app/shared/models/core/countdown';
|
||||||
import { ProjectorElement } from 'app/shared/models/core/projector';
|
import { ProjectorElement } from 'app/shared/models/core/projector';
|
||||||
import { ProjectorMessage } from 'app/shared/models/core/projector-message';
|
import { ProjectorMessage } from 'app/shared/models/core/projector-message';
|
||||||
|
import { infoDialogSettings, mediumDialogSettings } from 'app/shared/utils/dialog-settings';
|
||||||
import { BaseViewComponent } from 'app/site/base/base-view';
|
import { BaseViewComponent } from 'app/site/base/base-view';
|
||||||
import { Projectable } from 'app/site/base/projectable';
|
import { Projectable } from 'app/site/base/projectable';
|
||||||
import { ViewCountdown } from 'app/site/projector/models/view-countdown';
|
import { ViewCountdown } from 'app/site/projector/models/view-countdown';
|
||||||
@ -207,10 +208,7 @@ export class ProjectorDetailComponent extends BaseViewComponent implements OnIni
|
|||||||
|
|
||||||
const dialogRef = this.dialog.open(CountdownDialogComponent, {
|
const dialogRef = this.dialog.open(CountdownDialogComponent, {
|
||||||
data: countdownData,
|
data: countdownData,
|
||||||
maxHeight: '90vh',
|
...infoDialogSettings
|
||||||
width: '400px',
|
|
||||||
maxWidth: '90vw',
|
|
||||||
disableClose: true
|
|
||||||
});
|
});
|
||||||
|
|
||||||
dialogRef.afterClosed().subscribe(result => {
|
dialogRef.afterClosed().subscribe(result => {
|
||||||
@ -238,10 +236,7 @@ export class ProjectorDetailComponent extends BaseViewComponent implements OnIni
|
|||||||
|
|
||||||
const dialogRef = this.dialog.open(MessageDialogComponent, {
|
const dialogRef = this.dialog.open(MessageDialogComponent, {
|
||||||
data: messageData,
|
data: messageData,
|
||||||
maxHeight: '90vh',
|
...mediumDialogSettings
|
||||||
width: '800px',
|
|
||||||
maxWidth: '90vw',
|
|
||||||
disableClose: true
|
|
||||||
});
|
});
|
||||||
|
|
||||||
dialogRef.afterClosed().subscribe(result => {
|
dialogRef.afterClosed().subscribe(result => {
|
||||||
|
@ -10,6 +10,7 @@ import { TranslateService } from '@ngx-translate/core';
|
|||||||
import { AppPermissions, GroupRepositoryService } from 'app/core/repositories/users/group-repository.service';
|
import { AppPermissions, GroupRepositoryService } from 'app/core/repositories/users/group-repository.service';
|
||||||
import { PromptService } from 'app/core/ui-services/prompt.service';
|
import { PromptService } from 'app/core/ui-services/prompt.service';
|
||||||
import { Group } from 'app/shared/models/users/group';
|
import { Group } from 'app/shared/models/users/group';
|
||||||
|
import { infoDialogSettings } from 'app/shared/utils/dialog-settings';
|
||||||
import { BaseViewComponent } from 'app/site/base/base-view';
|
import { BaseViewComponent } from 'app/site/base/base-view';
|
||||||
import { ViewGroup } from '../../models/view-group';
|
import { ViewGroup } from '../../models/view-group';
|
||||||
|
|
||||||
@ -96,12 +97,7 @@ export class GroupListComponent extends BaseViewComponent implements OnInit {
|
|||||||
name: [name, Validators.required]
|
name: [name, Validators.required]
|
||||||
});
|
});
|
||||||
|
|
||||||
const dialogRef = this.dialog.open(this.groupEditDialog, {
|
const dialogRef = this.dialog.open(this.groupEditDialog, infoDialogSettings);
|
||||||
width: '400px',
|
|
||||||
maxWidth: '90vw',
|
|
||||||
maxHeight: '90vh',
|
|
||||||
disableClose: true
|
|
||||||
});
|
|
||||||
|
|
||||||
dialogRef.keydownEvents().subscribe((event: KeyboardEvent) => {
|
dialogRef.keydownEvents().subscribe((event: KeyboardEvent) => {
|
||||||
if (event.key === 'Enter' && event.shiftKey && this.groupForm.valid) {
|
if (event.key === 'Enter' && event.shiftKey && this.groupForm.valid) {
|
||||||
|
@ -17,6 +17,7 @@ import { ConfigService } from 'app/core/ui-services/config.service';
|
|||||||
import { CsvExportService } from 'app/core/ui-services/csv-export.service';
|
import { CsvExportService } from 'app/core/ui-services/csv-export.service';
|
||||||
import { PromptService } from 'app/core/ui-services/prompt.service';
|
import { PromptService } from 'app/core/ui-services/prompt.service';
|
||||||
import { genders } from 'app/shared/models/users/user';
|
import { genders } from 'app/shared/models/users/user';
|
||||||
|
import { infoDialogSettings } from 'app/shared/utils/dialog-settings';
|
||||||
import { BaseListViewComponent } from 'app/site/base/base-list-view';
|
import { BaseListViewComponent } from 'app/site/base/base-list-view';
|
||||||
import { UserFilterListService } from '../../services/user-filter-list.service';
|
import { UserFilterListService } from '../../services/user-filter-list.service';
|
||||||
import { UserPdfExportService } from '../../services/user-pdf-export.service';
|
import { UserPdfExportService } from '../../services/user-pdf-export.service';
|
||||||
@ -219,12 +220,7 @@ export class UserListComponent extends BaseListViewComponent<ViewUser> implement
|
|||||||
number: user.number
|
number: user.number
|
||||||
};
|
};
|
||||||
|
|
||||||
const dialogRef = this.dialog.open(this.userInfoDialog, {
|
const dialogRef = this.dialog.open(this.userInfoDialog, infoDialogSettings);
|
||||||
width: '400px',
|
|
||||||
maxWidth: '90vw',
|
|
||||||
maxHeight: '90vh',
|
|
||||||
disableClose: true
|
|
||||||
});
|
|
||||||
|
|
||||||
dialogRef.keydownEvents().subscribe((event: KeyboardEvent) => {
|
dialogRef.keydownEvents().subscribe((event: KeyboardEvent) => {
|
||||||
if (event.key === 'Enter' && event.shiftKey) {
|
if (event.key === 'Enter' && event.shiftKey) {
|
||||||
|
Loading…
Reference in New Issue
Block a user