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 {
|
.tour-buttons {
|
||||||
overflow: hidden; // clearfix
|
overflow: hidden; // clearfix
|
||||||
padding: 10px 70px 18px 65px; /*custom add*/
|
padding: 10px 70px 18px 65px; /*custom add*/
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
button.link-button {
|
button.link-button {
|
||||||
padding-left: 0;
|
padding-left: 0;
|
||||||
|
@ -203,9 +205,11 @@ ngx-guided-tour {
|
||||||
border-left: 0;
|
border-left: 0;
|
||||||
|
|
||||||
/*custom add*/
|
/*custom add*/
|
||||||
padding: 0;
|
// padding: 0;
|
||||||
float: right;
|
padding-right: 1em;
|
||||||
width: 133px;
|
padding-left: 1em;
|
||||||
|
// float: right;
|
||||||
|
min-width: 133px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
border: 1px solid #129d99;
|
border: 1px solid #129d99;
|
||||||
background: #ffffff 0% 0% no-repeat padding-box;
|
background: #ffffff 0% 0% no-repeat padding-box;
|
||||||
|
@ -222,9 +226,11 @@ ngx-guided-tour {
|
||||||
// padding-right: 10px;
|
// padding-right: 10px;
|
||||||
|
|
||||||
/*custom add*/
|
/*custom add*/
|
||||||
float: left;
|
// float: left;
|
||||||
padding: 10px 0px;
|
// padding: 10px 0px;
|
||||||
width: 101px;
|
padding-left: 1em;
|
||||||
|
padding-right: 1em;
|
||||||
|
min-width: 101px;
|
||||||
background: #129d99 0% 0% no-repeat padding-box;
|
background: #129d99 0% 0% no-repeat padding-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -560,7 +560,17 @@ export class DmpEditorComponent extends BaseComponent implements OnInit, IBreadC
|
||||||
onCallbackSuccessAddNew(dmp?: DmpModel) {
|
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.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.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) {
|
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.onSubmit(true, false);
|
||||||
// this.formSubmit(true, false);
|
// this.formSubmit(true, false);
|
||||||
|
@ -920,21 +931,34 @@ export class DmpEditorComponent extends BaseComponent implements OnInit, IBreadC
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
editDataset(id: string, isNew: boolean) {
|
editDataset(id: string, isNew: boolean, showModal:boolean = false) {
|
||||||
const dialogRef = this.dialog.open(DmpToDatasetDialogComponent, {
|
|
||||||
width: '500px',
|
|
||||||
autoFocus: false,
|
if(showModal){
|
||||||
restoreFocus: false,
|
const dialogRef = this.dialog.open(DmpToDatasetDialogComponent, {
|
||||||
});
|
width: '500px',
|
||||||
dialogRef.afterClosed().pipe(takeUntil(this._destroyed)).subscribe(result => {
|
autoFocus: false,
|
||||||
if (result) {
|
restoreFocus: false,
|
||||||
if (isNew) {
|
});
|
||||||
this.router.navigate(['/datasets', 'new', id]);
|
dialogRef.afterClosed().pipe(takeUntil(this._destroyed)).subscribe(result => {
|
||||||
} else {
|
if (result) {
|
||||||
this.router.navigate(['/datasets', 'edit', id]);
|
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() {
|
saveAndFinalize() {
|
||||||
|
|
|
@ -79,7 +79,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.attach-file {
|
.attach-file {
|
||||||
width: 156px;
|
min-width: 156px;
|
||||||
height: 44px;
|
height: 44px;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
background: #129d99 0% 0% no-repeat padding-box;
|
background: #129d99 0% 0% no-repeat padding-box;
|
||||||
|
|
|
@ -18,6 +18,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
h6 {
|
h6 {
|
||||||
// text-transform: capitalize;
|
text-transform: none;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.panel-desc {
|
.panel-desc {
|
||||||
text-transform: capitalize;
|
// text-transform: capitalize;
|
||||||
|
text-transform: none;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
margin-top: .5rem;
|
margin-top: .5rem;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue