From 49b74cfbc6a412029c2a25b57c469441bbe5aa3a Mon Sep 17 00:00:00 2001 From: Denys Vuika Date: Thu, 19 May 2016 11:52:04 +0100 Subject: [PATCH] #9 Minor fixes for document list --- demo-shell-ng2/app/components/files/files.component.html | 6 +----- .../src/components/document-list.ts | 4 ++++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/demo-shell-ng2/app/components/files/files.component.html b/demo-shell-ng2/app/components/files/files.component.html index e5772ef0b2..9b2504dc3d 100644 --- a/demo-shell-ng2/app/components/files/files.component.html +++ b/demo-shell-ng2/app/components/files/files.component.html @@ -8,10 +8,6 @@ source="name" class="full-width name-column"> - - @@ -78,4 +74,4 @@ - \ No newline at end of file + diff --git a/ng2-components/ng2-alfresco-documentlist/src/components/document-list.ts b/ng2-components/ng2-alfresco-documentlist/src/components/document-list.ts index a3bc8dfa17..fdb8845f55 100644 --- a/ng2-components/ng2-alfresco-documentlist/src/components/document-list.ts +++ b/ng2-components/ng2-alfresco-documentlist/src/components/document-list.ts @@ -349,9 +349,13 @@ export class DocumentList implements OnInit, AfterViewChecked, AfterContentInit if (this._hasEntries(node)) { node.list.entries.sort((a: MinimalNodeEntity, b: MinimalNodeEntity) => { if (a.entry.isFolder !== b.entry.isFolder) { + // Uncomment if it is needed to make files go top on desc + /* return options.direction === 'asc' ? (a.entry.isFolder ? -1 : 1) : (a.entry.isFolder ? 1 : -1); + */ + return a.entry.isFolder ? -1 : 1; } let left = this.getObjectValue(a.entry, options.key).toString();