Update README.md

This commit is contained in:
Denys Vuika 2017-04-27 09:59:23 +01:00 committed by Mario Romano
parent e065865ad4
commit fb25cd34d0

View File

@ -1,4 +1,4 @@
# Alfresco Upload Component for Angular 2 # Alfresco Upload Component for Angular
<p> <p>
<a title='Build Status Travis' href="https://travis-ci.org/Alfresco/alfresco-ng2-components"> <a title='Build Status Travis' href="https://travis-ci.org/Alfresco/alfresco-ng2-components">
@ -163,22 +163,24 @@ platformBrowserDynamic().bootstrapModule(AppModule);
``` ```
#### Events #### Events
Attribute | Description
--- | ---
`onSuccess` | The event is emitted when the file is uploaded
#### Options | Name | Description |
| --- | --- |
| `onSuccess` | The event is emitted when the file is uploaded |
Attribute | Options | Default | Description | Mandatory #### Properties
--- | --- | --- | --- | ---
`showNotificationBar` | *boolean* | true | Hide/show notification bar | | Name | Type | Default | Description |
`uploadFolders` | *boolean* | false | Allow/disallow upload folders (only for chrome) | | --- | --- | --- | --- |
`multipleFiles` | *boolean* | false | Allow/disallow multiple files | | `disabled` | *boolean* | false | Toggle component disabled state |
`acceptedFilesType` | *string* | * | array of allowed file extensions , example: ".jpg,.gif,.png,.svg" | | `showNotificationBar` | *boolean* | true | Hide/show notification bar |
`currentFolderPath` | *string* | '/Sites/swsdp/documentLibrary' | define the path where the files are uploaded | | `uploadFolders` | *boolean* | false | Allow/disallow upload folders (only for chrome) |
`versioning` | *boolean* | false | Versioning false is the default uploader behaviour and it rename using an integer suffix if there is a name clash. Versioning true to indicate that a major version should be created | | `multipleFiles` | *boolean* | false | Allow/disallow multiple files |
`staticTitle` | *string* | 'FILE_UPLOAD.BUTTON.UPLOAD_FILE' or 'FILE_UPLOAD.BUTTON.UPLOAD_FOLDER' string in the JSON text file | define the text of the upload button| | `acceptedFilesType` | *string* | * | array of allowed file extensions , example: ".jpg,.gif,.png,.svg" |
`disableWithNoPermission` | *boolean* | false | If the value is true and the user doesn't have the permission to delete the node the button will be disabled | | `currentFolderPath` | *string* | '/Sites/swsdp/documentLibrary' | define the path where the files are uploaded |
| `versioning` | *boolean* | false | Versioning false is the default uploader behaviour and it rename using an integer suffix if there is a name clash. Versioning true to indicate that a major version should be created |
| `staticTitle` | *string* | 'FILE_UPLOAD.BUTTON.UPLOAD_FILE' or 'FILE_UPLOAD.BUTTON.UPLOAD_FOLDER' string in the JSON text file | define the text of the upload button |
| `disableWithNoPermission` | *boolean* | false | If the value is true and the user doesn't have the permission to delete the node the button will be disabled |
### How to show notification message with no permission ### How to show notification message with no permission
You can show a notification error when the user doesn't have the right permission to perform the action. You can show a notification error when the user doesn't have the right permission to perform the action.
@ -280,23 +282,24 @@ platformBrowserDynamic().bootstrapModule(AppModule);
``` ```
#### Events #### Events
Attribute | Description
--- | ---
`onSuccess` | The event is emitted when the file is uploaded
#### Options | Name | Description |
| --- | --- |
| `onSuccess` | The event is emitted when the file is uploaded |
Attribute | Options | Default | Description | Mandatory #### Propertoes
--- | --- | --- | --- | ---
`showNotificationBar` | *boolean* | true | Hide/show notification bar | | Name | Type | Default | Description |
`currentFolderPath` | *string* | '/Sites/swsdp/documentLibrary' | define the path where the files are uploaded | | --- | --- | --- | --- |
`versioning` | *boolean* | false | Versioning false is the default uploader behaviour and it rename using an integer suffix if there is a name clash. Versioning true to indicate that a major version should be created | | `showNotificationBar` | *boolean* | true | Hide/show notification bar |
| `currentFolderPath` | *string* | '/Sites/swsdp/documentLibrary' | define the path where the files are uploaded |
| `versioning` | *boolean* | false | Versioning false is the default uploader behaviour and it rename using an integer suffix if there is a name clash. Versioning true to indicate that a major version should be created |
### Files Dialog ### Files Dialog
This component provides a dialog that shows all the files uploaded
with upload button or drag & drop area components. This component should This component provides a dialog that shows all the files uploaded with upload button or drag & drop area components.
be used in combination with upload button or drag & drop area. This component should be used in combination with upload button or drag & drop area.
#### Basic usage #### Basic usage
@ -308,7 +311,6 @@ with upload button or drag & drop area components. This component should
Alternatively you can build component from sources with the following commands: Alternatively you can build component from sources with the following commands:
```sh ```sh
npm install npm install
npm run build npm run build
@ -363,4 +365,4 @@ npm start
## License ## License
[Apache Version 2.0](https://github.com/Alfresco/alfresco-ng2-components/blob/master/LICENSE) [Apache Version 2.0](https://github.com/Alfresco/alfresco-ng2-components/blob/master/LICENSE)