Merges the functionality of "Export" and "Advanced Export" buttons to a new button. (Issue #172)
This commit is contained in:
parent
dac440b140
commit
568fa17a84
|
@ -62,8 +62,26 @@
|
||||||
<button mat-menu-item (click)="deleteClicked(activity)" class="menu-item">
|
<button mat-menu-item (click)="deleteClicked(activity)" class="menu-item">
|
||||||
<mat-icon>delete</mat-icon>{{ 'DMP-LISTING.ACTIONS.DELETE' | translate }}
|
<mat-icon>delete</mat-icon>{{ 'DMP-LISTING.ACTIONS.DELETE' | translate }}
|
||||||
</button>
|
</button>
|
||||||
<button mat-menu-item (click)="advancedClicked(activity)" class="menu-item">
|
<button mat-menu-item [matMenuTriggerFor]="exportMethod" class="menu-item">
|
||||||
<mat-icon>save_alt</mat-icon>{{ 'DMP-LISTING.ACTIONS.ADV-EXP' | translate }}
|
<mat-icon>save_alt</mat-icon>{{ 'DMP-LISTING.ACTIONS.EXP-AS' | translate }}
|
||||||
|
</button>
|
||||||
|
</mat-menu>
|
||||||
|
<mat-menu #exportMethod>
|
||||||
|
<button mat-menu-item (click)="downloadPDF(activity.id)">
|
||||||
|
<i class="fa fa-file-pdf-o pr-2"></i>
|
||||||
|
<span>{{'GENERAL.FILE-TYPES.PDF' | translate}}</span>
|
||||||
|
</button>
|
||||||
|
<button mat-menu-item (click)="downloadDocx(activity.id)">
|
||||||
|
<i class="fa fa-file-word-o pr-2"></i>
|
||||||
|
<span>{{'GENERAL.FILE-TYPES.DOC' | translate}}</span>
|
||||||
|
</button>
|
||||||
|
<button mat-menu-item (click)="downloadXml(activity.id)">
|
||||||
|
<i class="fa fa-file-code-o pr-2"></i>
|
||||||
|
<span>{{'GENERAL.FILE-TYPES.XML' | translate}}</span>
|
||||||
|
</button>
|
||||||
|
<button mat-menu-item (click)="downloadJson(activity.id)">
|
||||||
|
<i class="fa fa-file-o pr-2"></i>
|
||||||
|
<span>{{'GENERAL.FILE-TYPES.JSON' | translate}}</span>
|
||||||
</button>
|
</button>
|
||||||
</mat-menu>
|
</mat-menu>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -86,31 +86,6 @@ export class RecentEditedActivityComponent extends BaseComponent implements OnIn
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
advancedClicked(dmp: DmpListingModel) {
|
|
||||||
const dialogRef = this.dialog.open(ExportMethodDialogComponent, {
|
|
||||||
maxWidth: '500px',
|
|
||||||
data: {
|
|
||||||
message: "Download as:",
|
|
||||||
XMLButton: "XML",
|
|
||||||
documentButton: "Document",
|
|
||||||
pdfButton: "PDF",
|
|
||||||
jsonButton: "JSON"
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
dialogRef.afterClosed().pipe(takeUntil(this._destroyed)).subscribe(result => {
|
|
||||||
if (result == "pdf") {
|
|
||||||
this.downloadPDF(dmp.id);
|
|
||||||
} else if (result == "xml") {
|
|
||||||
this.downloadXml(dmp.id);
|
|
||||||
} else if (result == "doc") {
|
|
||||||
this.downloadDocx(dmp.id);
|
|
||||||
} else if (result == "json") {
|
|
||||||
this.downloadJson(dmp.id)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
onCallbackSuccess(): void {
|
onCallbackSuccess(): void {
|
||||||
this.uiNotificationService.snackBarNotification(this.language.instant('GENERAL.SNACK-BAR.SUCCESSFUL-UPDATE'), SnackBarNotificationLevel.Success);
|
this.uiNotificationService.snackBarNotification(this.language.instant('GENERAL.SNACK-BAR.SUCCESSFUL-UPDATE'), SnackBarNotificationLevel.Success);
|
||||||
this.router.navigate(['/plans']);
|
this.router.navigate(['/plans']);
|
||||||
|
@ -233,4 +208,29 @@ export class RecentEditedActivityComponent extends BaseComponent implements OnIn
|
||||||
}
|
}
|
||||||
return filename;
|
return filename;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// advancedClicked(dmp: DmpListingModel) {
|
||||||
|
// const dialogRef = this.dialog.open(ExportMethodDialogComponent, {
|
||||||
|
// maxWidth: '500px',
|
||||||
|
// data: {
|
||||||
|
// message: "Download as:",
|
||||||
|
// XMLButton: "XML",
|
||||||
|
// documentButton: "Document",
|
||||||
|
// pdfButton: "PDF",
|
||||||
|
// jsonButton: "JSON"
|
||||||
|
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// dialogRef.afterClosed().pipe(takeUntil(this._destroyed)).subscribe(result => {
|
||||||
|
// if (result == "pdf") {
|
||||||
|
// this.downloadPDF(dmp.id);
|
||||||
|
// } else if (result == "xml") {
|
||||||
|
// this.downloadXml(dmp.id);
|
||||||
|
// } else if (result == "doc") {
|
||||||
|
// this.downloadDocx(dmp.id);
|
||||||
|
// } else if (result == "json") {
|
||||||
|
// this.downloadJson(dmp.id)
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,14 +22,26 @@
|
||||||
<button mat-menu-item *ngIf="!viewOnly && !isCopy" (click)="openConfirm(formGroup.get('label').value, formGroup.get('id').value)" class="menu-item">
|
<button mat-menu-item *ngIf="!viewOnly && !isCopy" (click)="openConfirm(formGroup.get('label').value, formGroup.get('id').value)" class="menu-item">
|
||||||
<mat-icon>delete</mat-icon>{{ 'DATASET-WIZARD.ACTIONS.DELETE' | translate }}
|
<mat-icon>delete</mat-icon>{{ 'DATASET-WIZARD.ACTIONS.DELETE' | translate }}
|
||||||
</button>
|
</button>
|
||||||
<button mat-menu-item (click)="advancedClicked()" class="menu-item">
|
|
||||||
<mat-icon>save_alt</mat-icon>{{ 'DMP-LISTING.ACTIONS.ADV-EXP' | translate }}
|
|
||||||
</button>
|
|
||||||
<button mat-menu-item *ngIf="needsUpdate()" class="menu-item" (click)="openUpdateDatasetProfileDialogue();">{{ 'DATASET-WIZARD.ACTIONS.UPDATE-DATASET-PROFILE' | translate }}</button>
|
<button mat-menu-item *ngIf="needsUpdate()" class="menu-item" (click)="openUpdateDatasetProfileDialogue();">{{ 'DATASET-WIZARD.ACTIONS.UPDATE-DATASET-PROFILE' | translate }}</button>
|
||||||
</mat-menu>
|
</mat-menu>
|
||||||
<button mat-raised-button color="primary" (click)="downloadPDF()" class="lightblue-btn ml-2 text-uppercase">
|
|
||||||
<mat-icon>save_alt</mat-icon> {{ 'DMP-LISTING.ACTIONS.EXPORT' | translate }}
|
<button mat-raised-button [matMenuTriggerFor]="exportMenu" color="primary" class="lightblue-btn ml-2 export-btn">
|
||||||
|
<mat-icon>save_alt</mat-icon> {{ 'DMP-LISTING.ACTIONS.EXPORT' | translate }} <mat-icon>arrow_drop_down</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
|
<mat-menu #exportMenu="matMenu" xPosition="before">
|
||||||
|
<button mat-menu-item (click)="downloadPDF()">
|
||||||
|
<i class="fa fa-file-pdf-o pr-2"></i>
|
||||||
|
<span>{{'GENERAL.FILE-TYPES.PDF' | translate}}</span>
|
||||||
|
</button>
|
||||||
|
<button mat-menu-item (click)="downloadDOCX()">
|
||||||
|
<i class="fa fa-file-word-o pr-2"></i>
|
||||||
|
<span>{{'GENERAL.FILE-TYPES.DOC' | translate}}</span>
|
||||||
|
</button>
|
||||||
|
<button mat-menu-item (click)="downloadXML()">
|
||||||
|
<i class="fa fa-file-code-o pr-2"></i>
|
||||||
|
<span>{{'GENERAL.FILE-TYPES.XML' | translate}}</span>
|
||||||
|
</button>
|
||||||
|
</mat-menu>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<form *ngIf="formGroup" (ngSubmit)="formSubmit()">
|
<form *ngIf="formGroup" (ngSubmit)="formSubmit()">
|
||||||
|
|
|
@ -39,6 +39,9 @@
|
||||||
margin-right: 15px;
|
margin-right: 15px;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
}
|
}
|
||||||
|
.export-btn {
|
||||||
|
padding-right: 6px;
|
||||||
|
}
|
||||||
.downloadPDF {
|
.downloadPDF {
|
||||||
margin-top: 15px;
|
margin-top: 15px;
|
||||||
margin-bottom: 15px;
|
margin-bottom: 15px;
|
||||||
|
|
|
@ -521,26 +521,26 @@ export class DatasetWizardComponent extends BaseComponent implements OnInit, IBr
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
advancedClicked() {
|
// advancedClicked() {
|
||||||
const dialogRef = this.dialog.open(ExportMethodDialogComponent, {
|
// const dialogRef = this.dialog.open(ExportMethodDialogComponent, {
|
||||||
maxWidth: '500px',
|
// maxWidth: '500px',
|
||||||
data: {
|
// data: {
|
||||||
message: "Download as:",
|
// message: "Download as:",
|
||||||
XMLButton: "XML",
|
// XMLButton: "XML",
|
||||||
documentButton: "Document",
|
// documentButton: "Document",
|
||||||
pdfButton: "PDF"
|
// pdfButton: "PDF"
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
dialogRef.afterClosed().pipe(takeUntil(this._destroyed)).subscribe(result => {
|
// dialogRef.afterClosed().pipe(takeUntil(this._destroyed)).subscribe(result => {
|
||||||
if (result == "pdf") {
|
// if (result == "pdf") {
|
||||||
this.downloadPDF();
|
// this.downloadPDF();
|
||||||
} else if (result == "xml") {
|
// } else if (result == "xml") {
|
||||||
this.downloadXML();
|
// this.downloadXML();
|
||||||
} else if (result == "doc") {
|
// } else if (result == "doc") {
|
||||||
this.downloadDOCX();
|
// this.downloadDOCX();
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
|
|
||||||
getFilenameFromContentDispositionHeader(header: string): string {
|
getFilenameFromContentDispositionHeader(header: string): string {
|
||||||
const regex: RegExp = new RegExp(/filename[^;=\n]*=((['"]).*?\2|[^;\n]*)/g);
|
const regex: RegExp = new RegExp(/filename[^;=\n]*=((['"]).*?\2|[^;\n]*)/g);
|
||||||
|
|
|
@ -25,13 +25,29 @@
|
||||||
<button mat-menu-item (click)="delete()" class="menu-item">
|
<button mat-menu-item (click)="delete()" class="menu-item">
|
||||||
<mat-icon>delete</mat-icon>{{ 'DMP-LISTING.ACTIONS.DELETE' | translate }}
|
<mat-icon>delete</mat-icon>{{ 'DMP-LISTING.ACTIONS.DELETE' | translate }}
|
||||||
</button>
|
</button>
|
||||||
<button mat-menu-item (click)="advancedClicked()" class="menu-item">
|
</mat-menu>
|
||||||
<mat-icon>save_alt</mat-icon>{{ 'DMP-LISTING.ACTIONS.ADV-EXP' | translate }}
|
|
||||||
|
<button mat-raised-button [matMenuTriggerFor]="exportMenu" color="primary" class="lightblue-btn export-btn ml-2">
|
||||||
|
<mat-icon>save_alt</mat-icon> {{ 'DMP-LISTING.ACTIONS.EXPORT' | translate }} <mat-icon>arrow_drop_down</mat-icon>
|
||||||
|
</button>
|
||||||
|
<mat-menu #exportMenu="matMenu" xPosition="before">
|
||||||
|
<button mat-menu-item (click)="downloadPDF(dmp.id)">
|
||||||
|
<i class="fa fa-file-pdf-o pr-2"></i>
|
||||||
|
<span>{{'GENERAL.FILE-TYPES.PDF' | translate}}</span>
|
||||||
|
</button>
|
||||||
|
<button mat-menu-item (click)="downloadDocx(dmp.id)">
|
||||||
|
<i class="fa fa-file-word-o pr-2"></i>
|
||||||
|
<span>{{'GENERAL.FILE-TYPES.DOC' | translate}}</span>
|
||||||
|
</button>
|
||||||
|
<button mat-menu-item (click)="downloadXml(dmp.id)">
|
||||||
|
<i class="fa fa-file-code-o pr-2"></i>
|
||||||
|
<span>{{'GENERAL.FILE-TYPES.XML' | translate}}</span>
|
||||||
|
</button>
|
||||||
|
<button mat-menu-item (click)="downloadJson(dmp.id)">
|
||||||
|
<i class="fa fa-file-o pr-2"></i>
|
||||||
|
<span>{{'GENERAL.FILE-TYPES.JSON' | translate}}</span>
|
||||||
</button>
|
</button>
|
||||||
</mat-menu>
|
</mat-menu>
|
||||||
<button mat-raised-button color="primary" (click)="downloadPDF(dmp.id)" class="lightblue-btn ml-2 text-uppercase">
|
|
||||||
<mat-icon>save_alt</mat-icon> {{ 'DMP-LISTING.ACTIONS.EXPORT' | translate }}
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<form *ngIf="formGroup" (ngSubmit)="formSubmit()">
|
<form *ngIf="formGroup" (ngSubmit)="formSubmit()">
|
||||||
|
|
|
@ -15,6 +15,10 @@
|
||||||
color: #00b29f;
|
color: #00b29f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.export-btn {
|
||||||
|
padding-right: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
::ng-deep .mat-tab-labels {
|
::ng-deep .mat-tab-labels {
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
|
|
|
@ -338,30 +338,6 @@ export class DmpEditorComponent extends BaseComponent implements OnInit, IBreadC
|
||||||
this.router.navigate(['/plans/versions/' + rowId], { queryParams: { groupLabel: rowLabel } });
|
this.router.navigate(['/plans/versions/' + rowId], { queryParams: { groupLabel: rowLabel } });
|
||||||
}
|
}
|
||||||
|
|
||||||
advancedClicked() {
|
|
||||||
const dialogRef = this.dialog.open(ExportMethodDialogComponent, {
|
|
||||||
maxWidth: '500px',
|
|
||||||
data: {
|
|
||||||
message: "Download as:",
|
|
||||||
XMLButton: "XML",
|
|
||||||
documentButton: "Document",
|
|
||||||
pdfButton: "PDF",
|
|
||||||
jsonButton: "JSON"
|
|
||||||
}
|
|
||||||
});
|
|
||||||
dialogRef.afterClosed().pipe(takeUntil(this._destroyed)).subscribe(result => {
|
|
||||||
if (result == "pdf") {
|
|
||||||
this.downloadPDF(this.dmp.id);
|
|
||||||
} else if (result == "xml") {
|
|
||||||
this.downloadXml(this.dmp.id);
|
|
||||||
} else if (result == "doc") {
|
|
||||||
this.downloadDocx(this.dmp.id);
|
|
||||||
} else if (result == "json") {
|
|
||||||
this.downloadJson(this.dmp.id)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
downloadXml(id: string) {
|
downloadXml(id: string) {
|
||||||
this.dmpService.downloadXML(id)
|
this.dmpService.downloadXML(id)
|
||||||
.pipe(takeUntil(this._destroyed))
|
.pipe(takeUntil(this._destroyed))
|
||||||
|
@ -492,4 +468,28 @@ export class DmpEditorComponent extends BaseComponent implements OnInit, IBreadC
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// advancedClicked() {
|
||||||
|
// const dialogRef = this.dialog.open(ExportMethodDialogComponent, {
|
||||||
|
// maxWidth: '500px',
|
||||||
|
// data: {
|
||||||
|
// message: "Download as:",
|
||||||
|
// XMLButton: "XML",
|
||||||
|
// documentButton: "Document",
|
||||||
|
// pdfButton: "PDF",
|
||||||
|
// jsonButton: "JSON"
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// dialogRef.afterClosed().pipe(takeUntil(this._destroyed)).subscribe(result => {
|
||||||
|
// if (result == "pdf") {
|
||||||
|
// this.downloadPDF(this.dmp.id);
|
||||||
|
// } else if (result == "xml") {
|
||||||
|
// this.downloadXml(this.dmp.id);
|
||||||
|
// } else if (result == "doc") {
|
||||||
|
// this.downloadDocx(this.dmp.id);
|
||||||
|
// } else if (result == "json") {
|
||||||
|
// this.downloadJson(this.dmp.id)
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,19 +26,13 @@
|
||||||
<button mat-menu-item *ngIf="isDraftDmp(dmp)" (click)="deleteClicked()" class="menu-item">
|
<button mat-menu-item *ngIf="isDraftDmp(dmp)" (click)="deleteClicked()" class="menu-item">
|
||||||
<mat-icon>delete</mat-icon>{{ 'DMP-LISTING.ACTIONS.DELETE' | translate }}
|
<mat-icon>delete</mat-icon>{{ 'DMP-LISTING.ACTIONS.DELETE' | translate }}
|
||||||
</button>
|
</button>
|
||||||
<button mat-menu-item *ngIf="isDraftDmp(dmp)" (click)="advancedClicked()" class="menu-item">
|
|
||||||
<mat-icon>save_alt</mat-icon>{{ 'DMP-LISTING.ACTIONS.ADV-EXP' | translate }}
|
|
||||||
</button>
|
|
||||||
<button mat-menu-item *ngIf="isFinalizedDmp(dmp)" (click)="advancedClickedFinalized()" class="menu-item">
|
|
||||||
<mat-icon>save_alt</mat-icon>{{ 'DMP-LISTING.ACTIONS.ADV-EXP' | translate }}
|
|
||||||
</button>
|
|
||||||
</mat-menu>
|
</mat-menu>
|
||||||
|
|
||||||
<button *ngIf="isDraftDmp(dmp)" mat-raised-button color="primary" (click)="editClicked(dmp)" class="lightblue-btn ml-2">
|
<button *ngIf="isDraftDmp(dmp)" mat-raised-button color="primary" (click)="editClicked(dmp)" class="lightblue-btn ml-2">
|
||||||
<mat-icon>edit</mat-icon> {{ 'DMP-LISTING.ACTIONS.EDIT' | translate }}
|
<mat-icon>edit</mat-icon> {{ 'DMP-LISTING.ACTIONS.EDIT' | translate }}
|
||||||
</button>
|
</button>
|
||||||
<button mat-raised-button color="primary" (click)="downloadPDF(dmp.id)" class="lightblue-btn ml-2">
|
<button mat-raised-button [matMenuTriggerFor]="exportMenu" color="primary" class="lightblue-btn export-btn ml-2">
|
||||||
<mat-icon>save_alt</mat-icon> {{ 'DMP-LISTING.ACTIONS.EXPORT' | translate }}
|
<mat-icon>save_alt</mat-icon> {{ 'DMP-LISTING.ACTIONS.EXPORT' | translate }} <mat-icon>arrow_drop_down</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
<button *ngIf="showPublishButton(dmp)" mat-raised-button (click)="publish(dmp.id)" class="lightblue-btn ml-2">
|
<button *ngIf="showPublishButton(dmp)" mat-raised-button (click)="publish(dmp.id)" class="lightblue-btn ml-2">
|
||||||
<mat-icon>public</mat-icon> {{ 'DMP-LISTING.ACTIONS.PUBLISH' | translate }}
|
<mat-icon>public</mat-icon> {{ 'DMP-LISTING.ACTIONS.PUBLISH' | translate }}
|
||||||
|
@ -49,6 +43,25 @@
|
||||||
<button *ngIf="hasDoi(dmp) && isFinalizedDmp(dmp) && !this.isPublicView" mat-raised-button color="primary" (click)="getDoi(dmp)" class="lightblue-btn ml-2">
|
<button *ngIf="hasDoi(dmp) && isFinalizedDmp(dmp) && !this.isPublicView" mat-raised-button color="primary" (click)="getDoi(dmp)" class="lightblue-btn ml-2">
|
||||||
<mat-icon>archive</mat-icon> {{ 'DMP-LISTING.ACTIONS.GETDOI' | translate }}
|
<mat-icon>archive</mat-icon> {{ 'DMP-LISTING.ACTIONS.GETDOI' | translate }}
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
<mat-menu #exportMenu="matMenu" xPosition="before">
|
||||||
|
<button mat-menu-item (click)="downloadPDF(dmp.id)">
|
||||||
|
<i class="fa fa-file-pdf-o pr-2"></i>
|
||||||
|
<span>{{'GENERAL.FILE-TYPES.PDF' | translate}}</span>
|
||||||
|
</button>
|
||||||
|
<button mat-menu-item (click)="downloadDocx(dmp.id)">
|
||||||
|
<i class="fa fa-file-word-o pr-2"></i>
|
||||||
|
<span>{{'GENERAL.FILE-TYPES.DOC' | translate}}</span>
|
||||||
|
</button>
|
||||||
|
<button mat-menu-item (click)="downloadXml(dmp.id)">
|
||||||
|
<i class="fa fa-file-code-o pr-2"></i>
|
||||||
|
<span>{{'GENERAL.FILE-TYPES.XML' | translate}}</span>
|
||||||
|
</button>
|
||||||
|
<button *ngIf="isDraftDmp(dmp)" mat-menu-item (click)="downloadJson(dmp.id)">
|
||||||
|
<i class="fa fa-file-o pr-2"></i>
|
||||||
|
<span>{{'GENERAL.FILE-TYPES.JSON' | translate}}</span>
|
||||||
|
</button>
|
||||||
|
</mat-menu>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row ml-2">
|
<div class="row ml-2">
|
||||||
|
|
|
@ -17,6 +17,10 @@
|
||||||
color: #00b29f;
|
color: #00b29f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.export-btn {
|
||||||
|
padding-right: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
.menu-item {
|
.menu-item {
|
||||||
width: 248px;
|
width: 248px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -139,49 +139,6 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
advancedClicked() {
|
|
||||||
const dialogRef = this.dialog.open(ExportMethodDialogComponent, {
|
|
||||||
maxWidth: '500px',
|
|
||||||
data: {
|
|
||||||
message: "Download as:",
|
|
||||||
XMLButton: "XML",
|
|
||||||
documentButton: "Document",
|
|
||||||
pdfButton: "PDF",
|
|
||||||
jsonButton: "JSON"
|
|
||||||
}
|
|
||||||
});
|
|
||||||
dialogRef.afterClosed().pipe(takeUntil(this._destroyed)).subscribe(result => {
|
|
||||||
if (result == "pdf") {
|
|
||||||
this.downloadPDF(this.dmp.id);
|
|
||||||
} else if (result == "xml") {
|
|
||||||
this.downloadXml(this.dmp.id);
|
|
||||||
} else if (result == "doc") {
|
|
||||||
this.downloadDocx(this.dmp.id);
|
|
||||||
} else if (result == "json") {
|
|
||||||
this.downloadJson(this.dmp.id)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
advancedClickedFinalized() {
|
|
||||||
const dialogRef = this.dialog.open(ExportMethodDialogComponent, {
|
|
||||||
maxWidth: '250px',
|
|
||||||
data: {
|
|
||||||
message: "Download as:",
|
|
||||||
documentButton: "Document",
|
|
||||||
pdfButton: "PDF",
|
|
||||||
isFinalized: true
|
|
||||||
}
|
|
||||||
});
|
|
||||||
dialogRef.afterClosed().pipe(takeUntil(this._destroyed)).subscribe(result => {
|
|
||||||
if (result == "pdf") {
|
|
||||||
this.downloadPDF(this.dmp.id);
|
|
||||||
} else if (result == "doc") {
|
|
||||||
this.downloadDocx(this.dmp.id);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
onCallbackSuccess(): void {
|
onCallbackSuccess(): void {
|
||||||
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(['/plans']);
|
this.router.navigate(['/plans']);
|
||||||
|
@ -396,4 +353,48 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit {
|
||||||
viewVersions(rowId: String, rowLabel: String) {
|
viewVersions(rowId: String, rowLabel: String) {
|
||||||
this.router.navigate(['/plans/versions/' + rowId], { queryParams: { groupLabel: rowLabel } });
|
this.router.navigate(['/plans/versions/' + rowId], { queryParams: { groupLabel: rowLabel } });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// advancedClicked() {
|
||||||
|
// const dialogRef = this.dialog.open(ExportMethodDialogComponent, {
|
||||||
|
// maxWidth: '500px',
|
||||||
|
// data: {
|
||||||
|
// message: "Download as:",
|
||||||
|
// XMLButton: "XML",
|
||||||
|
// documentButton: "Document",
|
||||||
|
// pdfButton: "PDF",
|
||||||
|
// jsonButton: "JSON"
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// dialogRef.afterClosed().pipe(takeUntil(this._destroyed)).subscribe(result => {
|
||||||
|
// if (result == "pdf") {
|
||||||
|
// this.downloadPDF(this.dmp.id);
|
||||||
|
// } else if (result == "xml") {
|
||||||
|
// this.downloadXml(this.dmp.id);
|
||||||
|
// } else if (result == "doc") {
|
||||||
|
// this.downloadDocx(this.dmp.id);
|
||||||
|
// } else if (result == "json") {
|
||||||
|
// this.downloadJson(this.dmp.id);
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
|
||||||
|
// advancedClickedFinalized() {
|
||||||
|
// const dialogRef = this.dialog.open(ExportMethodDialogComponent, {
|
||||||
|
// maxWidth: '250px',
|
||||||
|
// data: {
|
||||||
|
// message: "Download as:",
|
||||||
|
// documentButton: "Document",
|
||||||
|
// pdfButton: "PDF",
|
||||||
|
// isFinalized: true
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// dialogRef.afterClosed().pipe(takeUntil(this._destroyed)).subscribe(result => {
|
||||||
|
// if (result == "pdf") {
|
||||||
|
// this.downloadPDF(this.dmp.id);
|
||||||
|
// } else if (result == "doc") {
|
||||||
|
// this.downloadDocx(this.dmp.id);
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -96,6 +96,12 @@
|
||||||
"DATASET-UPDATE": "Update Dataset Description",
|
"DATASET-UPDATE": "Update Dataset Description",
|
||||||
"DATASET-PROFILES-NEW-VERSION": "New Version of Dataset Description Template",
|
"DATASET-PROFILES-NEW-VERSION": "New Version of Dataset Description Template",
|
||||||
"DATASET-PROFILES-CLONE": "New Clone of Dataset Description Template"
|
"DATASET-PROFILES-CLONE": "New Clone of Dataset Description Template"
|
||||||
|
},
|
||||||
|
"FILE-TYPES": {
|
||||||
|
"PDF": "PDF",
|
||||||
|
"XML": "XML",
|
||||||
|
"JSON": "JSON",
|
||||||
|
"DOC": "Document"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"EMAIL-CONFIRMATION": {
|
"EMAIL-CONFIRMATION": {
|
||||||
|
@ -348,6 +354,7 @@
|
||||||
"PUBLISH": "Publish",
|
"PUBLISH": "Publish",
|
||||||
"FINALIZE": "Finalize",
|
"FINALIZE": "Finalize",
|
||||||
"ADV-EXP": "Advanced Export",
|
"ADV-EXP": "Advanced Export",
|
||||||
|
"EXP-AS": "Export As",
|
||||||
"DOWNLOAD-XML": "Download XML",
|
"DOWNLOAD-XML": "Download XML",
|
||||||
"DOWNLOAD-DOCX": "Download Document",
|
"DOWNLOAD-DOCX": "Download Document",
|
||||||
"DOWNLOAD-PDF": "Download PDF",
|
"DOWNLOAD-PDF": "Download PDF",
|
||||||
|
|
Loading…
Reference in New Issue