create bundle for all components

This commit is contained in:
Eugenio Romano
2016-12-14 15:49:08 +00:00
parent dfc8a0814c
commit e133fd6408
350 changed files with 8829 additions and 3002 deletions

View File

@@ -20,9 +20,10 @@
<div class="document-list__this-space-is-empty">This folder is empty</div>
<div class="document-list__drag-drop">Drag and Drop</div>
<div class="document-list__any-files-here-to-add">any files here to add</div>
<img src="./../img/empty_doc_lib.svg" class="document-list__empty_doc_lib">
<img [src]="baseComponentPath + '/../assets/images/empty_doc_lib.svg'" class="document-list__empty_doc_lib">
</div>
</template>
</no-content-template>
</div>
</alfresco-datatable>

View File

@@ -58,6 +58,11 @@ export class DocumentList implements OnInit, OnChanges, AfterContentInit {
DEFAULT_FOLDER_PATH: string = '/';
baseComponentPath = module.id.replace('/components/document-list.js', '');
@Input()
fallbackThubnail: string = this.baseComponentPath + '/../assets/images/ft_ic_miscellaneous.svg';
@Input()
set rootFolderId(value: string) {
this.data.rootFolderId = value || this.data.DEFAULT_ROOT_ID;
@@ -73,9 +78,6 @@ export class DocumentList implements OnInit, OnChanges, AfterContentInit {
return null;
}
@Input()
fallbackThubnail: string = null;
@Input()
navigate: boolean = true;
@@ -157,34 +159,11 @@ export class DocumentList implements OnInit, OnChanges, AfterContentInit {
private ngZone: NgZone,
private translate: AlfrescoTranslationService) {
let rootPath = './..';
try {
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, './..', []);
if (translate) {
translate.addTranslationFolder('ng2-alfresco-documentlist', 'node_modules/ng2-alfresco-documentlist/dist/src');
translate.addTranslationFolder('ng2-alfresco-documentlist', 'node_modules/ng2-alfresco-documentlist/src');
}
this.fallbackThubnail = this.resolveIconPath('ft_ic_miscellaneous.svg');
}
resolveIconPath(icon: string): string {
try {
// webpack
return require(`./../img/${icon}`);
} catch (e) {
// system.js
if (module && module.id) {
let baseComponentPath = module.id.replace('/components/document-list.js', '');
return `${baseComponentPath}/img/${icon}`;
}
}
return null;
}
getContextActions(node: MinimalNodeEntity) {

View File

@@ -60,7 +60,7 @@ export class DocumentMenuAction implements OnInit {
private translate: AlfrescoTranslationService) {
if (translate) {
translate.addTranslationFolder('ng2-alfresco-documentlist', 'node_modules/ng2-alfresco-documentlist/dist/src');
translate.addTranslationFolder('ng2-alfresco-documentlist', 'node_modules/ng2-alfresco-documentlist/src');
}
}