#9 Minor fixes for document list

This commit is contained in:
Denys Vuika 2016-05-19 11:52:04 +01:00
parent be9c07f2f5
commit 49b74cfbc6
2 changed files with 5 additions and 5 deletions

View File

@ -8,10 +8,6 @@
source="name"
class="full-width name-column">
</content-column>
<content-column
title="{{'DOCUMENT_LIST.COLUMNS.SITE' | translate}}"
source="location.site">
</content-column>
<content-column
title="{{'DOCUMENT_LIST.COLUMNS.CREATED_BY' | translate}}"
source="createdByUser.displayName">
@ -78,4 +74,4 @@
</alfresco-document-list>
</alfresco-upload-drag-area>
<alfresco-upload-button uploaddirectory="{{relativePath}}" currentFolderPath="{{absolutePath}}" (onSuccess)="refreshDocumentList($event)"></alfresco-upload-button>
<alfresco-upload-button uploaddirectory="{{relativePath}}" currentFolderPath="{{absolutePath}}" (onSuccess)="refreshDocumentList($event)"></alfresco-upload-button>

View File

@ -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();