]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/eg2/src/app/share/grid/grid-body.component.html
Docs: merge 3.2 release notes
[working/Evergreen.git] / Open-ILS / src / eg2 / src / app / share / grid / grid-body.component.html
1 <!--
2   tabindex=1 so the grid body can capture keyboard events.
3 -->
4 <div class="eg-grid-body" tabindex="1" (keydown)="onGridKeyDown($event)">
5   <div class="eg-grid-row eg-grid-body-row {{context.rowClassCallback(row)}}"
6     [ngClass]="{'selected': context.rowSelector.contains(context.getRowIndex(row))}"
7     *ngFor="let row of context.dataSource.getPageOfRows(context.pager); let idx = index">
8
9     <div class="eg-grid-cell eg-grid-checkbox-cell eg-grid-cell-skinny">
10       <input type='checkbox' [(ngModel)]="context.rowSelector.indexes[context.getRowIndex(row)]">
11     </div>
12     <div class="eg-grid-cell eg-grid-number-cell eg-grid-cell-skinny">
13       {{context.pager.rowNumber(idx)}}
14     </div>
15     <div *ngIf="context.rowFlairIsEnabled" class="eg-grid-cell eg-grid-flair-cell">
16       <!-- using *ngIf allows us to assign the flair callback to a value,
17             obviating the need for multiple calls of the same function -->
18       <ng-container *ngIf="context.rowFlairCallback(row); let flair">
19         <ng-container *ngIf="flair.icon">
20           <!-- tooltip is disabled when no title is set -->
21           <span class="material-icons"
22             ngbTooltip="{{flair.title || ''}}" triggers="mouseenter:mouseleave">
23             {{flair.icon}}
24           </span>
25         </ng-container>
26       </ng-container>
27     </div>
28     <div class="eg-grid-cell eg-grid-body-cell" [ngStyle]="{flex:col.flex}"
29       [ngClass]="{'eg-grid-cell-overflow': context.overflowCells}"
30       (dblclick)="onRowDblClick(row)"
31       (click)="onRowClick($event, row, idx)"
32       *ngFor="let col of context.columnSet.displayColumns()">
33
34       <eg-grid-body-cell [context]="context" [row]="row" [column]="col">
35       </eg-grid-body-cell>
36     </div>
37   </div>
38 </div>
39