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 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>
</div>

View File

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

View File

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