[ADF-551] sorting for document list (#1891)

* table cell component

- table cell component with performance improvements

* permissions and sorting fixes

- fixed ability to set default sorting
- fixed permission evaluation
- new: context menu now also works with permissions
- disabled tags column in demo shell due to performance implications

* fix unit tests

* fix tsconfig for unit testing
This commit is contained in:
Denys Vuika
2017-05-22 15:46:54 +01:00
committed by Eugenio Romano
parent ef5bb6333c
commit da18a21e7c
32 changed files with 112 additions and 92 deletions

View File

@@ -52,7 +52,10 @@ import { ContextMenuService } from './context-menu.service';
template: `
<div [ngStyle]="locationCss" class="menu-container">
<ul class="context-menu">
<li (click)="link.subject.next(link)" class="mdl-menu__item link" *ngFor="let link of links">
<li *ngFor="let link of links"
class="mdl-menu__item link"
(click)="onMenuItemClick($event, link)"
[attr.disabled]="link.model?.disabled || undefined">
{{link.title || link.model?.title}}
</li>
</ul>
@@ -82,6 +85,15 @@ export class ContextMenuHolderComponent {
this.isShown = false;
}
onMenuItemClick(event: Event, menuItem: any): void {
if (menuItem && menuItem.model && menuItem.model.disabled) {
event.preventDefault();
event.stopImmediatePropagation();
return;
}
menuItem.subject.next(menuItem);
}
showMenu(e, links) {
this.isShown = true;
this.links = links;