From daeddee98e6caee23ee827de72bc819ac35ffd29 Mon Sep 17 00:00:00 2001 From: Will Abson Date: Wed, 11 May 2016 17:22:20 +0100 Subject: [PATCH] Fix 404s when loading sample site content, missing Sites prefix Refs #7 --- .../src/components/document-list.js | 6 +++--- .../src/components/document-list.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ng2-components/ng2-alfresco-documentlist/src/components/document-list.js b/ng2-components/ng2-alfresco-documentlist/src/components/document-list.js index 8662e3a781..204272819d 100644 --- a/ng2-components/ng2-alfresco-documentlist/src/components/document-list.js +++ b/ng2-components/ng2-alfresco-documentlist/src/components/document-list.js @@ -48,7 +48,7 @@ System.register(['angular2/core', './../services/alfresco.service', './../models this.itemClick = new core_1.EventEmitter(); this.rootFolder = { name: 'Document Library', - path: 'swsdp/documentLibrary' + path: 'Sites/swsdp/documentLibrary' }; this.currentFolderPath = 'swsdp/documentLibrary'; this.route = []; @@ -204,8 +204,8 @@ System.register(['angular2/core', './../services/alfresco.service', './../models */ DocumentList.prototype.getNodePath = function (node) { if (node) { - var pathWithCompanyHome = node.entry.path.name; - return pathWithCompanyHome.replace('/Company Home', '') + '/' + node.entry.name; + var pathWithCompanyHome = item.entry.path.name; + return pathWithCompanyHome.replace('/Company Home', '') + '/' + item.entry.name; } return null; }; 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 3c32488c82..2af180f32f 100644 --- a/ng2-components/ng2-alfresco-documentlist/src/components/document-list.ts +++ b/ng2-components/ng2-alfresco-documentlist/src/components/document-list.ts @@ -56,7 +56,7 @@ export class DocumentList implements OnInit, AfterViewChecked, AfterContentInit rootFolder = { name: 'Document Library', - path: 'swsdp/documentLibrary' + path: 'Sites/swsdp/documentLibrary' }; currentFolderPath: string = 'swsdp/documentLibrary'; folder: NodePaging;