mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
fix document list bundling
This commit is contained in:
@@ -157,9 +157,11 @@ export class DocumentList implements OnInit, AfterContentInit {
|
|||||||
private translate: AlfrescoTranslationService) {
|
private translate: AlfrescoTranslationService) {
|
||||||
|
|
||||||
let rootPath = './..';
|
let rootPath = './..';
|
||||||
if (module && module.id) {
|
try {
|
||||||
rootPath = module.id.replace('/components/document-list.js', '');
|
if (module && module.id) {
|
||||||
}
|
rootPath = module.id.replace('/components/document-list.js', '');
|
||||||
|
}
|
||||||
|
} catch (e) {}
|
||||||
|
|
||||||
this.data = new ShareDataTableAdapter(this.documentListService, rootPath, []);
|
this.data = new ShareDataTableAdapter(this.documentListService, rootPath, []);
|
||||||
|
|
||||||
@@ -171,18 +173,17 @@ export class DocumentList implements OnInit, AfterContentInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
resolveIconPath(icon: string): string {
|
resolveIconPath(icon: string): string {
|
||||||
let result = null;
|
|
||||||
try {
|
try {
|
||||||
// webpack
|
// webpack
|
||||||
result = require(`./../img/${icon}`);
|
return require(`./../img/${icon}`);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
// system.js
|
// system.js
|
||||||
if (module && module.id) {
|
if (module && module.id) {
|
||||||
let baseComponentPath = module.id.replace('/components/document-list.js', '');
|
let baseComponentPath = module.id.replace('/components/document-list.js', '');
|
||||||
result = `${baseComponentPath}/img/${icon}`;
|
return `${baseComponentPath}/img/${icon}`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return result;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
getContextActions(node: MinimalNodeEntity) {
|
getContextActions(node: MinimalNodeEntity) {
|
||||||
|
@@ -313,17 +313,16 @@ export class ShareDataTableAdapter implements DataTableAdapter, PaginationProvid
|
|||||||
}
|
}
|
||||||
|
|
||||||
getImagePath(id: string): any {
|
getImagePath(id: string): any {
|
||||||
let result = null;
|
|
||||||
try {
|
try {
|
||||||
// webpack
|
// webpack
|
||||||
result = require(`${this.basePath}/img/${id}`);
|
return require(`./../img/${id}`);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
// system.js
|
// system.js
|
||||||
if (module && module.id) {
|
if (module && module.id) {
|
||||||
result = `${this.basePath}/img/${id}`;
|
return `${this.basePath}/img/${id}`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return result;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private resetPagination() {
|
private resetPagination() {
|
||||||
|
Reference in New Issue
Block a user