diff --git a/demo-shell/src/app.config.json b/demo-shell/src/app.config.json index 1028d7377c..18b2181d1a 100644 --- a/demo-shell/src/app.config.json +++ b/demo-shell/src/app.config.json @@ -487,7 +487,6 @@ }, "adf-version-manager": { "allowComments": true, - "allowDownload": true, - "allowDelete": true + "allowDownload": true } } diff --git a/demo-shell/src/app/components/files/files.component.html b/demo-shell/src/app/components/files/files.component.html index edd5d5652e..8a51b8c35f 100644 --- a/demo-shell/src/app/components/files/files.component.html +++ b/demo-shell/src/app/components/files/files.component.html @@ -361,8 +361,7 @@ + [allowDownload]="allowVersionDownload"> @@ -460,12 +459,6 @@ -
- - {{'APP.ADF_VERSION_MANAGER.ALLOW_DELETE' | translate}} - -
-
Upload
diff --git a/demo-shell/src/app/components/files/files.component.ts b/demo-shell/src/app/components/files/files.component.ts index 063329055e..2b76690d0a 100644 --- a/demo-shell/src/app/components/files/files.component.ts +++ b/demo-shell/src/app/components/files/files.component.ts @@ -105,9 +105,6 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy { @Input() allowVersionDownload = true; - @Input() - allowVersionDelete = true; - @Input() acceptedFilesType = '.jpg,.pdf,.js'; diff --git a/demo-shell/src/app/services/debug-app-config.service.ts b/demo-shell/src/app/services/debug-app-config.service.ts index b2f2c9c915..32d53f8ea1 100644 --- a/demo-shell/src/app/services/debug-app-config.service.ts +++ b/demo-shell/src/app/services/debug-app-config.service.ts @@ -27,11 +27,11 @@ export class DebugAppConfigService extends AppConfigService { } /** @override */ - get(key: string): T { + get(key: string, defaultValue?: T): T { if (key === 'ecmHost' || key === 'bpmHost') { return ( this.storage.getItem(key) || super.get(key)); } - return super.get(key); + return super.get(key, defaultValue); } } diff --git a/docs/content-services/version-list.component.md b/docs/content-services/version-list.component.md index 85930f42b2..ea0c34acb9 100644 --- a/docs/content-services/version-list.component.md +++ b/docs/content-services/version-list.component.md @@ -16,10 +16,18 @@ Displays the version history of a node in a Version Manager component | Name | Type | Default value | Description | | ---- | ---- | ------------- | ----------- | -| id | `string` | | ID of the node whose version history you want to display. | +| node | `MinimalNodeEntryEntity` | | Node whose version history you want to display. | | showComments | `boolean` | true | Set this to false if version comments should not be displayed. | | allowDownload | `boolean` | true | Toggles downloads of previous versions. Set this to false to not show the menu item for version download. | -| allowDelete | `boolean` | true | Toggles the version delete feature. | + +### DOM events + +All DOM events are bubbling and can be handled in the parent components up to the root application component. + +| Name | Description | +| --- | --- | +| version-deleted | Raised after a version is deleted. | +| version-restored | Raised after a version is restored. | ## Details diff --git a/docs/content-services/version-manager.component.md b/docs/content-services/version-manager.component.md index 7f3fb17385..60d7bd1091 100644 --- a/docs/content-services/version-manager.component.md +++ b/docs/content-services/version-manager.component.md @@ -26,7 +26,7 @@ Displays the version history of a node with the ability to upload a new version. | ---- | ---- | --- | ----------- | | node | [MinimalNodeEntryEntity](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/NodeMinimalEntry.md) | |The node you want to manage the version history of. | | showComments | `boolean` | true | Set this to false if version comments should not be displayed. | -| enableDownload | `boolean` | true | Configuration to enable/disable downloads of previous versions. Set this to false to not show the menu item for version download. | +| allowDownload | `boolean` | true | Toggles downloads of previous versions. Set this to false to not show the menu item for version download. | ### Events diff --git a/lib/content-services/i18n/en.json b/lib/content-services/i18n/en.json index 267f7a3d51..9e985fa4bb 100644 --- a/lib/content-services/i18n/en.json +++ b/lib/content-services/i18n/en.json @@ -11,9 +11,9 @@ }, "CONFIRM_DELETE": { "TITLE": "Delete version", - "MESSAGE": "Deleted file versions can not be restored. Delete?", - "YES_LABEL": "Yes", - "NO_LABEL": "No" + "MESSAGE": "Deleted file versions can not be restored.", + "YES_LABEL": "DELETE", + "NO_LABEL": "KEEP" } }, "ADF_CONFIRM_DIALOG": { diff --git a/lib/content-services/version-manager/version-list.component.html b/lib/content-services/version-manager/version-list.component.html index 174613f3bf..9d4fd46a8a 100644 --- a/lib/content-services/version-manager/version-list.component.html +++ b/lib/content-services/version-manager/version-list.component.html @@ -9,7 +9,7 @@

{{version.entry.versionComment}}

- -