From 9b78fcb445d212a91c99e9b601c250c642b5e8ac Mon Sep 17 00:00:00 2001 From: Denys Vuika Date: Thu, 3 May 2018 10:29:27 +0100 Subject: [PATCH] [ADF-2766] download button for custom sources (#3258) * download button for custom sources * fix enum usage --- .../app/components/files/custom-sources.component.html | 7 +++++++ .../src/app/components/files/custom-sources.component.ts | 4 ++++ .../document-list/services/custom-resources.service.ts | 9 +++++---- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/demo-shell/src/app/components/files/custom-sources.component.html b/demo-shell/src/app/components/files/custom-sources.component.html index abeb0e05ac..96196a8f2b 100644 --- a/demo-shell/src/app/components/files/custom-sources.component.html +++ b/demo-shell/src/app/components/files/custom-sources.component.html @@ -8,6 +8,13 @@ + + 0; + } } diff --git a/lib/content-services/document-list/services/custom-resources.service.ts b/lib/content-services/document-list/services/custom-resources.service.ts index 730657b053..8f4d489984 100644 --- a/lib/content-services/document-list/services/custom-resources.service.ts +++ b/lib/content-services/document-list/services/custom-resources.service.ts @@ -25,7 +25,8 @@ import { NodePaging, PersonEntry, SitePaging, - DeletedNodesPaging + DeletedNodesPaging, + SortDefinitionType } from 'alfresco-js-api'; import { Injectable } from '@angular/core'; import { Observable } from 'rxjs/Observable'; @@ -56,7 +57,7 @@ export class CustomResourcesService { ], include: ['path', 'properties', 'allowableOperations'], sort: [{ - type: 'FIELD', + type: SortDefinitionType.FIELD, field: 'cm:modified', ascending: false }], @@ -66,8 +67,8 @@ export class CustomResourcesService { } }; return this.apiService.searchApi.search(query) - .then((serachResult) => { - observer.next(serachResult); + .then((searchResult) => { + observer.next(searchResult); observer.complete(); }, (err) => {