Use alfresco-core-rest-api to fetch doclib items

Refs #7
This commit is contained in:
Will Abson
2016-05-06 13:48:00 +01:00
parent a8ba9203de
commit e619ff661c
12 changed files with 187 additions and 76 deletions

View File

@@ -125,10 +125,10 @@ System.register(['angular2/core', './../services/alfresco.service', './../models
value: item
});
if (this.navigate && item) {
if (item.isFolder) {
if (item.entry.isFolder) {
var path = this.getNodePath(item);
this.route.push({
name: item.displayName,
name: item.entry.name,
path: path
});
this.displayFolderContent(path);
@@ -204,10 +204,8 @@ System.register(['angular2/core', './../services/alfresco.service', './../models
*/
DocumentList.prototype.getNodePath = function (node) {
if (node) {
var container = node.location.container;
var path = node.location.path !== '/' ? (node.location.path + '/') : '/';
var relativePath = container + path + node.fileName;
return node.location.site + '/' + relativePath;
var pathWithCompanyHome = node.entry.path.name;
return pathWithCompanyHome.replace('/Company Home', '') + '/' + node.entry.name;
}
return null;
};