mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-3456] DocumentList - context menu (#3694)
* refactor context menu * prune log * remove fdescribe * remove undescore from private * fix e2e action buttons * fix trailing space * remove fdescribe
This commit is contained in:
committed by
Eugenio Romano
parent
62f0804205
commit
4404b724fa
@@ -18,7 +18,7 @@
|
||||
/* tslint:disable:no-input-rename */
|
||||
|
||||
import { Directive, HostListener, Input } from '@angular/core';
|
||||
import { ContextMenuService } from './context-menu.service';
|
||||
import { ContextMenuOverlayService } from './context-menu-overlay.service';
|
||||
|
||||
// @deprecated 2.3.0 context-menu tag removed
|
||||
@Directive({
|
||||
@@ -33,8 +33,7 @@ export class ContextMenuDirective {
|
||||
@Input('context-menu-enabled')
|
||||
enabled: boolean = false;
|
||||
|
||||
constructor(private _contextMenuService: ContextMenuService) {
|
||||
}
|
||||
constructor(private contextMenuService: ContextMenuOverlayService) {}
|
||||
|
||||
@HostListener('contextmenu', ['$event'])
|
||||
onShowContextMenu(event?: MouseEvent) {
|
||||
@@ -44,9 +43,10 @@ export class ContextMenuDirective {
|
||||
}
|
||||
|
||||
if (this.links && this.links.length > 0) {
|
||||
if (this._contextMenuService) {
|
||||
this._contextMenuService.show.next({event: event, obj: this.links});
|
||||
}
|
||||
this.contextMenuService.open({
|
||||
source: event,
|
||||
data: this.links
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user