UNPKG

nakedobjects.spa

Version:

Single Page Application client for a Naked Objects application.

40 lines (39 loc) 2.53 kB
<td class="checkbox" *ngIf="withCheckbox"> <input type="checkbox" [id]="id" [(ngModel)]="item.selected"> </td> <ng-container *ngIf="!isTable"> <td #focus class="reference" [ngClass]="color" nofClick (leftClick)="doClick()" (rightClick)="doClick(true)" dnd-draggable [dragEnabled]="true" [dragData]="item" (keydown)="copy($event, item)" (keypress)="copy($event, item)" tabindex="0"> <label attr.for="{{id}}">{{title}}</label> </td> </ng-container> <ng-container *ngIf="isTable"> <td #focus *ngIf="hasTableTitle()" nofClick (leftClick)="doClick()" (rightClick)="doClick(true)" [ngClass]="color" class="cell" dnd-draggable [dragEnabled]="true" [dragData]="item" (keydown)="copy($event, item)" (keypress)="copy($event, item)" [tabindex]="tabIndexFirstColumn('title')"> {{tableTitle()}} </td> <td *ngIf="friendlyName" class="cell" [ngClass]="color" nofClick (leftClick)="doClick()" (rightClick)="doClick(true)" dnd-draggable [dragEnabled]="true" [dragData]="item" (keydown)="copy($event, item)" (keypress)="copy($event, item)" [tabindex]="tabIndexFirstColumn('fname')"> {{friendlyName}} </td> <ng-container *ngIf="!friendlyName"> <td #focus *ngFor="let property of tableProperties(); let i = index" nofClick (leftClick)="doClick()" (rightClick)="doClick(true)" [ngClass]="color" class="cell" dnd-draggable [dragEnabled]="true" [dragData]="item" (keydown)="copy($event, item)" (keypress)="copy($event, item)" [tabindex]="tabIndexFirstColumn(i)"> <ng-container [ngSwitch]="propertyType(property)"> <ng-container *ngSwitchCase="'ref'"> {{propertyFormattedValue(property)}} </ng-container> <ng-container *ngSwitchCase="'scalar'" [ngSwitch]="propertyReturnType(property)"> <ng-container *ngSwitchCase="'boolean'"> <input type="checkbox" [checked]="propertyValue(property)" disabled="disabled" /> </ng-container> <ng-container *ngSwitchCase="'number'"> <div class="number">{{propertyFormattedValue(property)}}</div> </ng-container> <ng-container *ngSwitchDefault> <div>{{propertyFormattedValue(property)}}</div> </ng-container> </ng-container> </ng-container> </td> </ng-container> </ng-container>