|
43 | 43 | [sorter]="getDefaultSorter(col)"
|
44 | 44 | (sorted)="sort($event)" class="{{col.property}}" [ngClass]="{
|
45 | 45 | 'fit': col.type === 'checkbox' || col.property === 'action',
|
46 |
| - 'percent':col.type === 'percent' |
| 46 | + 'percent':col.type === 'percent' || col.type === 'number' |
47 | 47 | }">
|
48 | 48 | <fa-icon class="icon up sorter" [icon]="icons.faArrowUp" style="display: none"></fa-icon>
|
49 | 49 | <fa-icon class="icon down sorter" [icon]="icons.faArrowDown" style="display: none"></fa-icon>
|
50 | 50 |
|
51 |
| - <div *ngIf="!col.headerlink && col.type !== 'selector'" class="pull-left">{{col?.name}}</div> |
| 51 | + <div *ngIf="!col.headerlink && col.type !== 'selector'" class="pull-left">{{col?.name}}{{col?.type === 'percent' ? ', %' : ''}}</div> |
52 | 52 | <a *ngIf="col.headerlink" class="pull-left" oncontextmenu="return false;"
|
53 |
| - (contextmenu)="openlink(col.headerlink)" title="Right click to open">{{col?.name}}</a> |
| 53 | + (contextmenu)="openlink(col.headerlink)" title="Right click to open">{{col?.name}}{{col?.type === 'percent' ? ', %' : ''}}</a> |
54 | 54 | <input *ngIf="col.type === 'selector'" name="select_all" type="checkbox"
|
55 | 55 | [title]="selectAll ? 'Deselect All' : 'Select All'" [ngModel]="selectAll"
|
56 | 56 | (ngModelChange)="toggleSelectAll($event)" />
|
|
102 | 102 | (modelChange)="handleLookupFilterChange(col.lookup.objectWithId ? col.lookup.objectWithId : col.lookup.entity, [$event])">
|
103 | 103 | </lookup-autocomplete>
|
104 | 104 |
|
105 |
| - <div *ngIf="col.type === 'percent' && col.filter" |
| 105 | + <div *ngIf="(col.type === 'percent' || col.type === 'number') && col.filter" |
106 | 106 | [ngClass]="{ 'has-error': isRangeInvalid(col) }">
|
107 | 107 | <input placeholder="from" class="inline form-control input-sm ft-range-selector"
|
108 |
| - (keyup)="rangeKeyUp($event)" |
| 108 | + (keyup)="rangeKeyUp($event, col)" |
109 | 109 | (ngModelChange)="handleRangeFilterChange(col, $event, 'from')"
|
110 |
| - [ngModel]="rangeFilterData(col.property, 'from')" type="number" min="0" max="100" |
| 110 | + [ngModel]="rangeFilterData(col.property, 'from')" type="number" min="0" [max]="col.type === 'percent' ? 100 : undefined" |
111 | 111 | oninput="this.value = this.value.replace(/[^0-9]/g, '');">
|
112 | 112 | <input placeholder="to" class="inline form-control input-sm ft-range-selector"
|
113 | 113 | (ngModelChange)="handleRangeFilterChange(col, $event, 'to')"
|
114 |
| - [ngModel]="rangeFilterData(col.property, 'to')" type="number" min="0" max="100" |
115 |
| - (keyup)="rangeKeyUp($event)" oninput="this.value = this.value.replace(/[^0-9]/g, '');"> |
| 114 | + [ngModel]="rangeFilterData(col.property, 'to')" type="number" min="0" [max]="col.type === 'percent' ? 100 : undefined" |
| 115 | + (keyup)="rangeKeyUp($event, col)" oninput="this.value = this.value.replace(/[^0-9]/g, '');"> |
116 | 116 | <fa-icon class="icon" [icon]="icons.faTimes" (click)="removeRangeFilter(col.property)">
|
117 | 117 | </fa-icon>
|
118 | 118 | </div>
|
|
366 | 366 | (blur)="sendUpdate(entity)" />
|
367 | 367 |
|
368 | 368 | <div
|
369 |
| - *ngIf="(col.type === 'text' || col.type=='email' || col.type=='percent' || col.type=='textarea') && (!col.editable || entity.constantRow || notEditableByProperty(entity, col)) && !col.link"> |
| 369 | + *ngIf="(col.type === 'text' || col.type=='email' || col.type=='percent' || col.type=='number' || col.type=='textarea') && (!col.editable || entity.constantRow || notEditableByProperty(entity, col)) && !col.link"> |
370 | 370 | {{transformationsService.getPropertyValue(entity, col.property)}}</div>
|
371 | 371 | <attachment-inline *ngIf="col.type === 'file'" [name]="col.property + rowNum"
|
372 | 372 | [model]="transformationsService.getPropertyValue(entity, col.property)"
|
|
0 commit comments