Suppress browser context menu for document list

- preparing document list for own context menu
This commit is contained in:
Denys Vuika
2016-06-09 11:02:00 +01:00
parent 8344e00d8b
commit e7d27f03ae

View File

@@ -41,7 +41,10 @@ declare let __moduleName: string;
selector: 'alfresco-document-list',
styleUrls: ['./document-list.css'],
templateUrl: './document-list.html',
providers: [AlfrescoService]
providers: [AlfrescoService],
host: {
'(contextmenu)': 'onShowContextMenu($event)'
}
})
export class DocumentList implements OnInit, AfterViewChecked, AfterContentInit, OnChanges {
@@ -251,6 +254,12 @@ export class DocumentList implements OnInit, AfterViewChecked, AfterContentInit,
}
}
onShowContextMenu(e?: Event) {
if (e) {
e.preventDefault();
}
}
private performNavigation(node: MinimalNodeEntity) {
if (node && node.entry && node.entry.isFolder) {
let path = this.getNodePath(node);