🐛 fix deletions in date buttons , input of type date

This commit is contained in:
Baptiste Lemoine 2019-11-19 11:18:58 +01:00
parent cf2a12507e
commit 933c32798c
2 changed files with 23 additions and 14 deletions

View File

@ -28,14 +28,7 @@
> >
{{"dates.add"|translate}} {{"dates.add"|translate}}
</button> </button>
<button
class="btn btn-primary"
(click)="addtime()"
id="add_time_button"
*ngIf="config.allowSeveralHours=='false'"
>
{{"dates.addTime"|translate}}
</button>
<button <button
class="btn btn-warning" class="btn btn-warning"
@ -44,10 +37,21 @@
>{{"dates.empty"|translate}} >{{"dates.empty"|translate}}
</button> </button>
<div class="dates-list"> <div class="dates-list">
<span class="count-dates">
{{config.dateList.length}} {{config.dateList.length}}
<span> </span>
<span class="count-dates-txt">
{{"dates.count_dates"|translate}} {{"dates.count_dates"|translate}}
</span> </span>
<button
class="btn btn-primary pull-right"
(click)="addtime()"
id="add_time_button"
*ngIf="config.allowSeveralHours=='false'"
>
{{"dates.addTime"|translate}}
</button>
<div <div
class="identical-dates" class="identical-dates"
*ngIf="'false'==config.allowSeveralHours" *ngIf="'false'==config.allowSeveralHours"
@ -61,7 +65,7 @@
name="timeChoices_{{id}}" name="timeChoices_{{id}}"
[(ngModel)]="choice.literal" [(ngModel)]="choice.literal"
> >
<button (click)="config.timeList.splice(id, 1)">X</button> <button class="btn btn-warning" (click)="config.timeList.splice(id, 1)">X</button>
</div> </div>
</div> </div>
<hr> <hr>
@ -73,7 +77,7 @@
class="date-choice" class="date-choice"
> >
<input <input
type="text" type="date"
name="dateChoices_{{id}}" name="dateChoices_{{id}}"
[(ngModel)]="choice.literal" [(ngModel)]="choice.literal"
> >
@ -83,6 +87,7 @@
>X >X
</button> </button>
<button <button
*ngIf="config.allowSeveralHours=='true'"
class="btn btn-primary" class="btn btn-primary"
(click)="addTimetoDate(choice, id)" (click)="addTimetoDate(choice, id)"
> Ajouter un choix d'heure > Ajouter un choix d'heure
@ -102,7 +107,7 @@
> >
<button <button
class="btn btn-warning" class="btn btn-warning"
(click)="config.timeList.splice(idTime, 1)" (click)="choice.timeList.splice(idTime, 1)"
>X >X
</button> </button>
</div> </div>

View File

@ -1,7 +1,11 @@
.several-times { .several-times {
padding-left: 1em; padding-left: 1em;
}
input { :host {
margin-right: 1em; input, button {
+ button {
margin-left: 1em;
}
} }
} }