funky-framadate-front/src/app/features/administration/form/date/list/time/time-list.component.html

24 lines
946 B
HTML

<div class="time-list-container" cdkDropList [cdkDropListData]="timeSlices" (cdkDropListDropped)="dropTimeItem($event)">
<div *ngFor="let time of timeSlices; index as id" class="time-choice">
<label class="icon button is-default" for="choice_{{ prefix_choice_id }}_timeChoices_{{ id }}">
{{ 'hours.element' | translate }} {{ id }}
<i class="fa fa-arrows-v" aria-hidden="true"></i>
</label>
<input
class="time-list-item"
[(ngModel)]="time.literal"
name="timeChoices_{{ id }}"
(keyup.arrowDown)="focusOnNextField(id)"
(keyup.arrowUp)="focusOnFieldNumber(id - 1)"
(keyup.arrowLeft)="removeTimeIfEmpty(time.literal, id)"
(keyup.alt.d)="removeTime(id)"
(blur)="removeTimeIfEmpty(time.literal, id)"
type="text"
id="choice_{{ prefix_choice_id }}_timeChoices_{{ id }}"
/>
<button (click)="removeTime(id)" class="btn btn-warning">
<i class="fa fa-times" aria-hidden="true"></i>
</button>
</div>
</div>