Removes focus of button that opens dialog after close it.

This commit is contained in:
apapachristou 2019-09-27 11:09:29 +03:00
parent f00633ea71
commit 586e6c2f64
12 changed files with 27 additions and 13 deletions

View File

@ -248,6 +248,7 @@ export class DatasetProfileEditorComponent extends BaseComponent implements OnIn
public delete(): void { public delete(): void {
if (this.datasetProfileId && !this.isNew) { if (this.datasetProfileId && !this.isNew) {
const dialogRef = this.dialog.open(ConfirmationDialogComponent, { const dialogRef = this.dialog.open(ConfirmationDialogComponent, {
restoreFocus: false,
data: { data: {
message: this.language.instant('GENERAL.CONFIRMATION-DIALOG.DELETE-ITEM'), message: this.language.instant('GENERAL.CONFIRMATION-DIALOG.DELETE-ITEM'),
confirmButton: this.language.instant('GENERAL.CONFIRMATION-DIALOG.ACTIONS.CONFIRM'), confirmButton: this.language.instant('GENERAL.CONFIRMATION-DIALOG.ACTIONS.CONFIRM'),

View File

@ -49,6 +49,7 @@ export class DatasetProfileCriteriaComponent extends BaseCriteriaComponent imple
openDialog(): void { openDialog(): void {
const dialogRef = this.dialog.open(DialodConfirmationUploadDatasetProfiles, { const dialogRef = this.dialog.open(DialodConfirmationUploadDatasetProfiles, {
restoreFocus: false,
data: { data: {
message: this.language.instant('DATASET-WIZARD.UPLOAD.UPLOAD-XML-FILE-TITLE'), message: this.language.instant('DATASET-WIZARD.UPLOAD.UPLOAD-XML-FILE-TITLE'),
confirmButton: this.language.instant('DATASET-WIZARD.UPLOAD.UPLOAD-XML'), confirmButton: this.language.instant('DATASET-WIZARD.UPLOAD.UPLOAD-XML'),

View File

@ -55,6 +55,7 @@ export class DmpProfileCriteriaComponent extends BaseCriteriaComponent implement
openDialog(): void { openDialog(): void {
const dialogRef = this.dialog.open(DialodConfirmationUploadDmpProfiles, { const dialogRef = this.dialog.open(DialodConfirmationUploadDmpProfiles, {
restoreFocus: false,
data: { data: {
message: this.language.instant('DMP-PROFILE-LISTING.UPLOAD.UPLOAD-XML-FILE-TITLE'), message: this.language.instant('DMP-PROFILE-LISTING.UPLOAD.UPLOAD-XML-FILE-TITLE'),
confirmButton: this.language.instant('DMP-PROFILE-LISTING.UPLOAD.UPLOAD-XML'), confirmButton: this.language.instant('DMP-PROFILE-LISTING.UPLOAD.UPLOAD-XML'),

View File

@ -67,6 +67,7 @@ export class RecentEditedActivityComponent extends BaseComponent implements OnIn
deleteClicked(dmp: DmpListingModel) { deleteClicked(dmp: DmpListingModel) {
const dialogRef = this.dialog.open(ConfirmationDialogComponent, { const dialogRef = this.dialog.open(ConfirmationDialogComponent, {
maxWidth: '300px', maxWidth: '300px',
restoreFocus: false,
data: { data: {
message: this.language.instant('GENERAL.CONFIRMATION-DIALOG.DELETE-ITEM'), message: this.language.instant('GENERAL.CONFIRMATION-DIALOG.DELETE-ITEM'),
confirmButton: this.language.instant('GENERAL.CONFIRMATION-DIALOG.ACTIONS.DELETE'), confirmButton: this.language.instant('GENERAL.CONFIRMATION-DIALOG.ACTIONS.DELETE'),

View File

@ -82,6 +82,7 @@ export class DatasetCreateWizard extends CheckDeactivateBaseComponent implements
saveFinalize() { saveFinalize() {
const dialogRef = this.dialog.open(ConfirmationDialogComponent, { const dialogRef = this.dialog.open(ConfirmationDialogComponent, {
maxWidth: '300px', maxWidth: '300px',
restoreFocus: false,
data: { data: {
message: this.language.instant('GENERAL.CONFIRMATION-DIALOG.FINALIZE-ITEM'), message: this.language.instant('GENERAL.CONFIRMATION-DIALOG.FINALIZE-ITEM'),
confirmButton: this.language.instant('GENERAL.CONFIRMATION-DIALOG.ACTIONS.CONFIRM'), confirmButton: this.language.instant('GENERAL.CONFIRMATION-DIALOG.ACTIONS.CONFIRM'),

View File

@ -457,6 +457,7 @@ export class DatasetWizardComponent extends BaseComponent implements OnInit, IBr
saveFinalize() { saveFinalize() {
const dialogRef = this.dialog.open(ConfirmationDialogComponent, { const dialogRef = this.dialog.open(ConfirmationDialogComponent, {
restoreFocus: false,
data: { data: {
message: this.language.instant('GENERAL.CONFIRMATION-DIALOG.FINALIZE-ITEM'), message: this.language.instant('GENERAL.CONFIRMATION-DIALOG.FINALIZE-ITEM'),
confirmButton: this.language.instant('QUICKWIZARD.SAVE-DIALOG.ACTIONS.AFFIRMATIVE'), confirmButton: this.language.instant('QUICKWIZARD.SAVE-DIALOG.ACTIONS.AFFIRMATIVE'),
@ -599,6 +600,7 @@ export class DatasetWizardComponent extends BaseComponent implements OnInit, IBr
openConfirm(dmpLabel, id): void { openConfirm(dmpLabel, id): void {
const dialogRef = this.dialog.open(ConfirmationDialogComponent, { const dialogRef = this.dialog.open(ConfirmationDialogComponent, {
maxWidth: '300px', maxWidth: '300px',
restoreFocus: false,
data: { data: {
message: this.language.instant('GENERAL.CONFIRMATION-DIALOG.DELETE-ITEM'), message: this.language.instant('GENERAL.CONFIRMATION-DIALOG.DELETE-ITEM'),
confirmButton: this.language.instant('GENERAL.CONFIRMATION-DIALOG.ACTIONS.DELETE'), confirmButton: this.language.instant('GENERAL.CONFIRMATION-DIALOG.ACTIONS.DELETE'),
@ -621,6 +623,7 @@ export class DatasetWizardComponent extends BaseComponent implements OnInit, IBr
openDmpSearchDialogue() { openDmpSearchDialogue() {
const formControl = new FormControl(); const formControl = new FormControl();
const dialogRef = this.dialog.open(DatasetCopyDialogueComponent, { const dialogRef = this.dialog.open(DatasetCopyDialogueComponent, {
restoreFocus: false,
data: { data: {
formControl: formControl, formControl: formControl,
datasetId: this.formGroup.value.id, datasetId: this.formGroup.value.id,
@ -652,6 +655,7 @@ export class DatasetWizardComponent extends BaseComponent implements OnInit, IBr
openUpdateDatasetProfileDialogue() { openUpdateDatasetProfileDialogue() {
const dialogRef = this.dialog.open(ConfirmationDialogComponent, { const dialogRef = this.dialog.open(ConfirmationDialogComponent, {
restoreFocus: false,
data: { data: {
message: this.language.instant('DATASET-EDITOR.VERSION-DIALOG.QUESTION'), message: this.language.instant('DATASET-EDITOR.VERSION-DIALOG.QUESTION'),
confirmButton: this.language.instant('GENERAL.CONFIRMATION-DIALOG.ACTIONS.CONFIRM'), confirmButton: this.language.instant('GENERAL.CONFIRMATION-DIALOG.ACTIONS.CONFIRM'),

View File

@ -142,9 +142,8 @@ export class DatasetExternalReferencesEditorComponent extends BaseComponent impl
addDataRepository() { addDataRepository() {
const dialogRef = this.dialog.open(DatasetExternalDataRepositoryDialogEditorComponent, { const dialogRef = this.dialog.open(DatasetExternalDataRepositoryDialogEditorComponent, {
data: { restoreFocus: false,
data: {}
}
}); });
dialogRef.afterClosed() dialogRef.afterClosed()
.pipe(takeUntil(this._destroyed)) .pipe(takeUntil(this._destroyed))
@ -157,9 +156,8 @@ export class DatasetExternalReferencesEditorComponent extends BaseComponent impl
addRegistry() { addRegistry() {
const dialogRef = this.dialog.open(DatasetExternalRegistryDialogEditorComponent, { const dialogRef = this.dialog.open(DatasetExternalRegistryDialogEditorComponent, {
data: { restoreFocus: false,
data: {}
}
}); });
dialogRef.afterClosed() dialogRef.afterClosed()
.pipe(takeUntil(this._destroyed)) .pipe(takeUntil(this._destroyed))
@ -172,9 +170,8 @@ export class DatasetExternalReferencesEditorComponent extends BaseComponent impl
addExternalDataset() { addExternalDataset() {
const dialogRef = this.dialog.open(DatasetExternalDatasetDialogEditorComponent, { const dialogRef = this.dialog.open(DatasetExternalDatasetDialogEditorComponent, {
data: { restoreFocus: false,
data: {}
}
}); });
dialogRef.afterClosed() dialogRef.afterClosed()
.pipe(takeUntil(this._destroyed)) .pipe(takeUntil(this._destroyed))
@ -187,9 +184,8 @@ export class DatasetExternalReferencesEditorComponent extends BaseComponent impl
addService() { addService() {
const dialogRef = this.dialog.open(DatasetExternalServiceDialogEditorComponent, { const dialogRef = this.dialog.open(DatasetExternalServiceDialogEditorComponent, {
data: { restoreFocus: false,
data: {}
}
}); });
dialogRef.afterClosed() dialogRef.afterClosed()
.pipe(takeUntil(this._destroyed)) .pipe(takeUntil(this._destroyed))

View File

@ -291,6 +291,7 @@ export class DmpEditorComponent extends BaseComponent implements OnInit, IBreadC
public delete(): void { public delete(): void {
const dialogRef = this.dialog.open(ConfirmationDialogComponent, { const dialogRef = this.dialog.open(ConfirmationDialogComponent, {
maxWidth: '300px', maxWidth: '300px',
restoreFocus: false,
data: { data: {
message: this.language.instant('GENERAL.CONFIRMATION-DIALOG.DELETE-ITEM'), message: this.language.instant('GENERAL.CONFIRMATION-DIALOG.DELETE-ITEM'),
confirmButton: this.language.instant('GENERAL.CONFIRMATION-DIALOG.ACTIONS.DELETE'), confirmButton: this.language.instant('GENERAL.CONFIRMATION-DIALOG.ACTIONS.DELETE'),
@ -424,6 +425,7 @@ export class DmpEditorComponent extends BaseComponent implements OnInit, IBreadC
addDatasetOpenDialog(id: String) { addDatasetOpenDialog(id: String) {
const dialogRef = this.dialog.open(ConfirmationDialogComponent, { const dialogRef = this.dialog.open(ConfirmationDialogComponent, {
maxWidth: '500px', maxWidth: '500px',
restoreFocus: false,
data: { data: {
message: this.language.instant('GENERAL.CONFIRMATION-DIALOG.ADD-DATASET'), message: this.language.instant('GENERAL.CONFIRMATION-DIALOG.ADD-DATASET'),
confirmButton: this.language.instant('GENERAL.CONFIRMATION-DIALOG.ACTIONS.CONFIRM'), confirmButton: this.language.instant('GENERAL.CONFIRMATION-DIALOG.ACTIONS.CONFIRM'),
@ -452,6 +454,7 @@ export class DmpEditorComponent extends BaseComponent implements OnInit, IBreadC
const dialogRef = this.dialog.open(DmpFinalizeDialogComponent, { const dialogRef = this.dialog.open(DmpFinalizeDialogComponent, {
maxWidth: '500px', maxWidth: '500px',
restoreFocus: false,
data: { data: {
dialogInputModel: dialogInputModel, dialogInputModel: dialogInputModel,
message: this.language.instant('GENERAL.CONFIRMATION-DIALOG.FINALIZE-ITEM'), message: this.language.instant('GENERAL.CONFIRMATION-DIALOG.FINALIZE-ITEM'),

View File

@ -57,6 +57,7 @@ export class DmpListingItemComponent implements OnInit {
const dialogRef = this.dialog.open(DmpInvitationDialogComponent, { const dialogRef = this.dialog.open(DmpInvitationDialogComponent, {
// height: '250px', // height: '250px',
// width: '700px', // width: '700px',
restoreFocus: false,
data: { data: {
dmpId: rowId, dmpId: rowId,
dmpName: rowName dmpName: rowName

View File

@ -17,7 +17,6 @@ import { AuthService } from '../../../core/services/auth/auth.service';
import { DmpService } from '../../../core/services/dmp/dmp.service'; import { DmpService } from '../../../core/services/dmp/dmp.service';
import { SnackBarNotificationLevel, UiNotificationService } from '../../../core/services/notification/ui-notification-service'; import { SnackBarNotificationLevel, UiNotificationService } from '../../../core/services/notification/ui-notification-service';
import { ConfirmationDialogComponent } from '../../../library/confirmation-dialog/confirmation-dialog.component'; import { ConfirmationDialogComponent } from '../../../library/confirmation-dialog/confirmation-dialog.component';
import { ExportMethodDialogComponent } from '../../../library/export-method-dialog/export-method-dialog.component';
import { BreadcrumbItem } from '../../misc/breadcrumb/definition/breadcrumb-item'; import { BreadcrumbItem } from '../../misc/breadcrumb/definition/breadcrumb-item';
import { DmpFinalizeDialogComponent, DmpFinalizeDialogInput, DmpFinalizeDialogOutput } from '../editor/dmp-finalize-dialog/dmp-finalize-dialog.component'; import { DmpFinalizeDialogComponent, DmpFinalizeDialogInput, DmpFinalizeDialogOutput } from '../editor/dmp-finalize-dialog/dmp-finalize-dialog.component';
import { DatasetsToBeFinalized } from '../../../core/model/dataset/datasets-toBeFinalized'; import { DatasetsToBeFinalized } from '../../../core/model/dataset/datasets-toBeFinalized';
@ -253,6 +252,7 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit {
getDoi(dmp: DmpOverviewModel) { getDoi(dmp: DmpOverviewModel) {
const dialogRef = this.dialog.open(ConfirmationDialogComponent, { const dialogRef = this.dialog.open(ConfirmationDialogComponent, {
maxWidth: '600px', maxWidth: '600px',
restoreFocus: false,
data: { data: {
message: this.language.instant('GENERAL.CONFIRMATION-DIALOG.ZENODO-DOI'), message: this.language.instant('GENERAL.CONFIRMATION-DIALOG.ZENODO-DOI'),
confirmButton: this.language.instant('GENERAL.CONFIRMATION-DIALOG.ACTIONS.CONFIRM'), confirmButton: this.language.instant('GENERAL.CONFIRMATION-DIALOG.ACTIONS.CONFIRM'),
@ -289,6 +289,7 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit {
publish(dmpId: String) { publish(dmpId: String) {
const dialogRef = this.dialog.open(ConfirmationDialogComponent, { const dialogRef = this.dialog.open(ConfirmationDialogComponent, {
maxWidth: '300px', maxWidth: '300px',
restoreFocus: false,
data: { data: {
message: this.language.instant('GENERAL.CONFIRMATION-DIALOG.PUBLISH-ITEM'), message: this.language.instant('GENERAL.CONFIRMATION-DIALOG.PUBLISH-ITEM'),
confirmButton: this.language.instant('GENERAL.CONFIRMATION-DIALOG.ACTIONS.CONFIRM'), confirmButton: this.language.instant('GENERAL.CONFIRMATION-DIALOG.ACTIONS.CONFIRM'),
@ -317,6 +318,7 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit {
const dialogRef = this.dialog.open(DmpFinalizeDialogComponent, { const dialogRef = this.dialog.open(DmpFinalizeDialogComponent, {
maxWidth: '500px', maxWidth: '500px',
restoreFocus: false,
data: { data: {
dialogInputModel: dialogInputModel, dialogInputModel: dialogInputModel,
message: this.language.instant('GENERAL.CONFIRMATION-DIALOG.FINALIZE-ITEM'), message: this.language.instant('GENERAL.CONFIRMATION-DIALOG.FINALIZE-ITEM'),

View File

@ -142,6 +142,7 @@ export class GrantEditorComponent extends BaseComponent implements OnInit, IBrea
public delete(): void { public delete(): void {
const dialogRef = this.dialog.open(ConfirmationDialogComponent, { const dialogRef = this.dialog.open(ConfirmationDialogComponent, {
maxWidth: '300px', maxWidth: '300px',
restoreFocus: false,
data: { data: {
message: this.language.instant('GENERAL.CONFIRMATION-DIALOG.DELETE-ITEM'), message: this.language.instant('GENERAL.CONFIRMATION-DIALOG.DELETE-ITEM'),
confirmButton: this.language.instant('GENERAL.CONFIRMATION-DIALOG.ACTIONS.CONFIRM'), confirmButton: this.language.instant('GENERAL.CONFIRMATION-DIALOG.ACTIONS.CONFIRM'),

View File

@ -108,6 +108,7 @@ export class QuickWizardEditorComponent extends CheckDeactivateBaseComponent imp
const dialogRef = this.dialog.open(DmpFinalizeDialogComponent, { const dialogRef = this.dialog.open(DmpFinalizeDialogComponent, {
maxWidth: '500px', maxWidth: '500px',
restoreFocus: false,
data: { data: {
dialogInputModel: dialogInputModel, dialogInputModel: dialogInputModel,
confirmButton: this.language.instant('DMP-FINALISE-DIALOG.SUBMIT'), confirmButton: this.language.instant('DMP-FINALISE-DIALOG.SUBMIT'),
@ -162,6 +163,7 @@ export class QuickWizardEditorComponent extends CheckDeactivateBaseComponent imp
onSubmitSave(): void { onSubmitSave(): void {
const dialogRef = this.dialog.open(ConfirmationDialogComponent, { const dialogRef = this.dialog.open(ConfirmationDialogComponent, {
restoreFocus: false,
data: { data: {
message: this.language.instant('QUICKWIZARD.SAVE-DIALOG.TITLE'), message: this.language.instant('QUICKWIZARD.SAVE-DIALOG.TITLE'),
confirmButton: this.language.instant('QUICKWIZARD.SAVE-DIALOG.ACTIONS.AFFIRMATIVE'), confirmButton: this.language.instant('QUICKWIZARD.SAVE-DIALOG.ACTIONS.AFFIRMATIVE'),