DMP Editor: remove modal when navigating to dataset. Minor ui fixes.
This commit is contained in:
parent
45227cca10
commit
ab9bb3e8cf
|
@ -179,6 +179,8 @@ ngx-guided-tour {
|
|||
.tour-buttons {
|
||||
overflow: hidden; // clearfix
|
||||
padding: 10px 70px 18px 65px; /*custom add*/
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
button.link-button {
|
||||
padding-left: 0;
|
||||
|
@ -203,9 +205,11 @@ ngx-guided-tour {
|
|||
border-left: 0;
|
||||
|
||||
/*custom add*/
|
||||
padding: 0;
|
||||
float: right;
|
||||
width: 133px;
|
||||
// padding: 0;
|
||||
padding-right: 1em;
|
||||
padding-left: 1em;
|
||||
// float: right;
|
||||
min-width: 133px;
|
||||
height: 40px;
|
||||
border: 1px solid #129d99;
|
||||
background: #ffffff 0% 0% no-repeat padding-box;
|
||||
|
@ -222,9 +226,11 @@ ngx-guided-tour {
|
|||
// padding-right: 10px;
|
||||
|
||||
/*custom add*/
|
||||
float: left;
|
||||
padding: 10px 0px;
|
||||
width: 101px;
|
||||
// float: left;
|
||||
// padding: 10px 0px;
|
||||
padding-left: 1em;
|
||||
padding-right: 1em;
|
||||
min-width: 101px;
|
||||
background: #129d99 0% 0% no-repeat padding-box;
|
||||
}
|
||||
|
||||
|
|
|
@ -560,7 +560,17 @@ export class DmpEditorComponent extends BaseComponent implements OnInit, IBreadC
|
|||
onCallbackSuccessAddNew(dmp?: DmpModel) {
|
||||
// this.uiNotificationService.snackBarNotification(this.isNew ? this.language.instant('GENERAL.SNACK-BAR.SUCCESSFUL-CREATION') : this.language.instant('GENERAL.SNACK-BAR.SUCCESSFUL-UPDATE'), SnackBarNotificationLevel.Success);
|
||||
// this.router.navigate(['/datasets', 'new', dmp.id]);
|
||||
this.editDataset(dmp.id, true);
|
||||
// const showDialog = this.isNew && (this.formGroup.get('datasets') );
|
||||
|
||||
let showDialog = false;
|
||||
|
||||
try{
|
||||
showDialog = this.isNew && !this.formGroup.get('datasets').value.length;
|
||||
}catch{
|
||||
|
||||
}
|
||||
|
||||
this.editDataset(dmp.id, true, showDialog);
|
||||
}
|
||||
|
||||
public setErrorModel(validationErrorModel: ValidationErrorModel) {
|
||||
|
@ -877,6 +887,7 @@ export class DmpEditorComponent extends BaseComponent implements OnInit, IBreadC
|
|||
}
|
||||
|
||||
|
||||
// const showDialog = this.hasProfile() && this.isNew;
|
||||
|
||||
this.onSubmit(true, false);
|
||||
// this.formSubmit(true, false);
|
||||
|
@ -920,21 +931,34 @@ export class DmpEditorComponent extends BaseComponent implements OnInit, IBreadC
|
|||
});
|
||||
}
|
||||
|
||||
editDataset(id: string, isNew: boolean) {
|
||||
const dialogRef = this.dialog.open(DmpToDatasetDialogComponent, {
|
||||
width: '500px',
|
||||
autoFocus: false,
|
||||
restoreFocus: false,
|
||||
});
|
||||
dialogRef.afterClosed().pipe(takeUntil(this._destroyed)).subscribe(result => {
|
||||
if (result) {
|
||||
if (isNew) {
|
||||
this.router.navigate(['/datasets', 'new', id]);
|
||||
} else {
|
||||
this.router.navigate(['/datasets', 'edit', id]);
|
||||
editDataset(id: string, isNew: boolean, showModal:boolean = false) {
|
||||
|
||||
|
||||
if(showModal){
|
||||
const dialogRef = this.dialog.open(DmpToDatasetDialogComponent, {
|
||||
width: '500px',
|
||||
autoFocus: false,
|
||||
restoreFocus: false,
|
||||
});
|
||||
dialogRef.afterClosed().pipe(takeUntil(this._destroyed)).subscribe(result => {
|
||||
if (result) {
|
||||
if (isNew) {
|
||||
this.router.navigate(['/datasets', 'new', id]);
|
||||
} else {
|
||||
this.router.navigate(['/datasets', 'edit', id]);
|
||||
}
|
||||
}
|
||||
});
|
||||
}else{
|
||||
if (isNew) {
|
||||
this.router.navigate(['/datasets', 'new', id]);
|
||||
} else {
|
||||
this.router.navigate(['/datasets', 'edit', id]);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
saveAndFinalize() {
|
||||
|
|
|
@ -79,7 +79,7 @@
|
|||
}
|
||||
|
||||
.attach-file {
|
||||
width: 156px;
|
||||
min-width: 156px;
|
||||
height: 44px;
|
||||
color: #ffffff;
|
||||
background: #129d99 0% 0% no-repeat padding-box;
|
||||
|
|
|
@ -18,6 +18,6 @@
|
|||
}
|
||||
|
||||
h6 {
|
||||
// text-transform: capitalize;
|
||||
text-transform: none;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
|
|
@ -24,7 +24,8 @@
|
|||
}
|
||||
|
||||
.panel-desc {
|
||||
text-transform: capitalize;
|
||||
// text-transform: capitalize;
|
||||
text-transform: none;
|
||||
font-weight: 400;
|
||||
margin-top: .5rem;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue