diff --git a/demo-shell-ng2/app/components/files/files.component.ts b/demo-shell-ng2/app/components/files/files.component.ts
index c2a9c034e4..639e089cd8 100644
--- a/demo-shell-ng2/app/components/files/files.component.ts
+++ b/demo-shell-ng2/app/components/files/files.component.ts
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-import { Component, OnInit, AfterViewInit, Optional, ViewChild, ChangeDetectorRef } from '@angular/core';
+import { Component, Input, OnInit, AfterViewInit, Optional, ViewChild, ChangeDetectorRef } from '@angular/core';
import { ActivatedRoute, Params, Router } from '@angular/router';
import { AlfrescoAuthenticationService, LogService, NotificationService } from 'ng2-alfresco-core';
import { DocumentActionsService, DocumentListComponent, ContentActionHandler, DocumentActionModel, FolderActionModel } from 'ng2-alfresco-documentlist';
@@ -34,13 +34,28 @@ export class FilesComponent implements OnInit, AfterViewInit {
errorMessage: string = null;
fileNodeId: any;
fileShowed: boolean = false;
+
+ @Input()
multipleFileUpload: boolean = false;
+
+ @Input()
disableWithNoPermission: boolean = false;
+
+ @Input()
folderUpload: boolean = false;
+
+ @Input()
acceptedFilesTypeShow: boolean = false;
+
+ @Input()
versioning: boolean = false;
+
+ @Input()
acceptedFilesType: string = '.jpg,.pdf,.js';
+ @Input()
+ enableUpload: boolean = true;
+
@ViewChild(DocumentListComponent)
documentList: DocumentListComponent;
@@ -82,32 +97,12 @@ export class FilesComponent implements OnInit, AfterViewInit {
}
}
- toggleMultipleFileUpload() {
- this.multipleFileUpload = !this.multipleFileUpload;
- return this.multipleFileUpload;
- }
-
- toggleDisableWithNoPermission() {
- this.disableWithNoPermission = !this.disableWithNoPermission;
- return this.disableWithNoPermission;
- }
-
toggleFolder() {
this.multipleFileUpload = false;
this.folderUpload = !this.folderUpload;
return this.folderUpload;
}
- toggleAcceptedFilesType() {
- this.acceptedFilesTypeShow = !this.acceptedFilesTypeShow;
- return this.acceptedFilesTypeShow;
- }
-
- toggleVersioning() {
- this.versioning = !this.versioning;
- return this.versioning;
- }
-
ngOnInit() {
if (this.route) {
this.route.params.forEach((params: Params) => {
diff --git a/ng2-components/ng2-alfresco-upload/src/components/upload-button.component.html b/ng2-components/ng2-alfresco-upload/src/components/upload-button.component.html
index c93621f5b1..78f28aaa24 100644
--- a/ng2-components/ng2-alfresco-upload/src/components/upload-button.component.html
+++ b/ng2-components/ng2-alfresco-upload/src/components/upload-button.component.html
@@ -1,7 +1,7 @@