add checkbox option file upload

This commit is contained in:
Eugenio Romano
2016-07-18 16:14:31 +01:00
parent 68bc0c7949
commit 387ac6329c
2 changed files with 68 additions and 32 deletions

View File

@@ -56,12 +56,14 @@ export class FilesComponent {
fileName: string;
mimeType: string;
fileShowed: boolean = false;
multipleFileUpload: boolean = false;
folderUpload: boolean = false;
acceptedFilesTypeShow: boolean = false;
acceptedFilesType: string = '.jpg,.pdf,.js';
constructor(
private contentService: AlfrescoContentService,
documentActions: DocumentActionsService) {
constructor(private contentService: AlfrescoContentService,
documentActions: DocumentActionsService) {
documentActions.setHandler('my-handler', this.myDocumentActionHandler.bind(this));
}
@@ -93,4 +95,20 @@ export class FilesComponent {
this.currentPath = event.path;
}
}
toggleMultipleFileUpload() {
this.multipleFileUpload = !this.multipleFileUpload;
return this.multipleFileUpload;
}
toggleFolder() {
this.multipleFileUpload = false;
this.folderUpload = !this.folderUpload;
return this.folderUpload;
}
toggleAcceptedFilesType() {
this.acceptedFilesTypeShow = !this.acceptedFilesTypeShow;
return this.acceptedFilesTypeShow;
}
}