Removes file upload from dialog for now.

This commit is contained in:
Aaron Louie 2020-03-20 17:08:49 -04:00
parent afca7cece8
commit 0915c9021d
3 changed files with 13 additions and 13 deletions

View File

@ -5,6 +5,6 @@
</div> </div>
<div mat-dialog-actions> <div mat-dialog-actions>
<button [disabled]="!data.fileName" (click)="onSubmit()" color="primary" mat-flat-button>Save</button> <button [disabled]="!model.fileName" (click)="onSubmit()" color="primary" mat-flat-button>Save</button>
<button (click)="onNoClick()" mat-flat-button>Cancel</button> <button (click)="onNoClick()" mat-flat-button>Cancel</button>
</div> </div>

View File

@ -51,15 +51,15 @@ export class FileMetaDialogComponent {
options: fileTypeOptions, options: fileTypeOptions,
}, },
}, },
{ // {
key: 'file', // key: 'file',
type: 'file', // type: 'file',
defaultValue: this.data.file, // defaultValue: this.data.file,
templateOptions: { // templateOptions: {
label: 'File', // label: 'File',
required: true, // required: true,
}, // },
} // }
]; ];
} }
@ -68,8 +68,8 @@ export class FileMetaDialogComponent {
} }
onSubmit() { onSubmit() {
this.data.fileName = cleanUpFilename(this.data.fileName, this.data.fileType); this.model.fileName = cleanUpFilename(this.model.fileName, this.model.fileType);
this.dialogRef.close(this.data); this.dialogRef.close(this.model);
} }
} }

View File

@ -120,7 +120,7 @@ export class ModelerComponent implements AfterViewInit {
this.xml = (event.target as FileReader).result.toString(); this.xml = (event.target as FileReader).result.toString();
const diagramType = getDiagramTypeFromXml(this.xml); const diagramType = getDiagramTypeFromXml(this.xml);
this.diagramComponent.openDiagram(this.xml, diagramType); this.diagramComponent.openDiagram(this.xml, diagramType);
}; }
readFile(file: File) { readFile(file: File) {
// FileReader must be instantiated this way so unit test can spy on it. // FileReader must be instantiated this way so unit test can spy on it.