mirror of
https://framagit.org/framasoft/framadate/funky-framadate-front.git
synced 2023-08-25 13:53:14 +02:00
toast on day deletion, icon trash 2 replacement
Signed-off-by: tykayn <15d65f2f-0b14-4f70-bf34-e130180ed62b@users.tedomum.net>
This commit is contained in:
parent
41ce51b421
commit
874b9cdf16
@ -31,7 +31,7 @@
|
|||||||
class="has-no-outline has-no-background has-text-primary has-text-left"
|
class="has-no-outline has-no-background has-text-primary has-text-left"
|
||||||
(click)="deleteChoiceField(id)"
|
(click)="deleteChoiceField(id)"
|
||||||
>
|
>
|
||||||
<img class="icon" aria-hidden="true" src="assets/icons/trash.svg" />
|
<img class="icon" aria-hidden="true" src="assets/icons/trash-2.svg" />
|
||||||
{{ 'dates.remove' | translate }} {{ id + 1 }}
|
{{ 'dates.remove' | translate }} {{ id + 1 }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@ -39,7 +39,7 @@
|
|||||||
</fieldset>
|
</fieldset>
|
||||||
<div class="add_date">
|
<div class="add_date">
|
||||||
<!-- ajouter une date-->
|
<!-- ajouter une date-->
|
||||||
<button class="button is-primary is-fullwidth" (click)="addChoice()">
|
<button class="button is-primary is-fullwidth is-thin" (click)="addChoice()">
|
||||||
{{ 'dates.add' | translate }}
|
{{ 'dates.add' | translate }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -10,6 +10,8 @@ import { DateChoice } from '../../../../../../core/models/dateChoice.model';
|
|||||||
import { PollService } from '../../../../../../core/services/poll.service';
|
import { PollService } from '../../../../../../core/services/poll.service';
|
||||||
import { DateUtilitiesService } from '../../../../../../core/services/date.utilities.service';
|
import { DateUtilitiesService } from '../../../../../../core/services/date.utilities.service';
|
||||||
import { environment } from 'src/environments/environment';
|
import { environment } from 'src/environments/environment';
|
||||||
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-day-list',
|
selector: 'app-day-list',
|
||||||
templateUrl: './day-list.component.html',
|
templateUrl: './day-list.component.html',
|
||||||
@ -30,6 +32,7 @@ export class DayListComponent {
|
|||||||
public dialog: MatDialog,
|
public dialog: MatDialog,
|
||||||
private toastService: ToastService,
|
private toastService: ToastService,
|
||||||
private pollService: PollService,
|
private pollService: PollService,
|
||||||
|
private translate: TranslateService,
|
||||||
private dateUtilitiesService: DateUtilitiesService,
|
private dateUtilitiesService: DateUtilitiesService,
|
||||||
private cd: ChangeDetectorRef,
|
private cd: ChangeDetectorRef,
|
||||||
@Inject(DOCUMENT) private document: any,
|
@Inject(DOCUMENT) private document: any,
|
||||||
@ -166,6 +169,11 @@ export class DayListComponent {
|
|||||||
this.dateChoices.splice(index, 1);
|
this.dateChoices.splice(index, 1);
|
||||||
this.cd.detectChanges();
|
this.cd.detectChanges();
|
||||||
this.focusOnChoice(index - 1 < 0 ? 0 : index - 1);
|
this.focusOnChoice(index - 1 < 0 ? 0 : index - 1);
|
||||||
|
|
||||||
|
this.translate.get('success.deleted_day').subscribe((resp) => {
|
||||||
|
console.log('resp', resp);
|
||||||
|
this.toastService.display(`${resp}`);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
isWeekendDay(date_input: string) {
|
isWeekendDay(date_input: string) {
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
<button class="button delete-date is-block" (click)="StorageService.choicesText.splice(ii, 1)">
|
<button class="button delete-date is-block" (click)="StorageService.choicesText.splice(ii, 1)">
|
||||||
<img class="icon" src="assets/icons/trash.svg" />
|
<img class="icon" src="assets/icons/trash-2.svg" />
|
||||||
{{ 'choices.delete' | translate }}
|
{{ 'choices.delete' | translate }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -183,6 +183,8 @@
|
|||||||
"link": "Public link to share",
|
"link": "Public link to share",
|
||||||
"label": "Check your poll",
|
"label": "Check your poll",
|
||||||
"action": "See my poll",
|
"action": "See my poll",
|
||||||
|
"deleted_option": "Option removed",
|
||||||
|
"deleted_day": "Date removed",
|
||||||
"admins": "Admin side",
|
"admins": "Admin side",
|
||||||
"users": "Respondent side",
|
"users": "Respondent side",
|
||||||
"links_mail": "Receive links by email",
|
"links_mail": "Receive links by email",
|
||||||
|
@ -89,7 +89,7 @@
|
|||||||
"add": "Ajouter date",
|
"add": "Ajouter date",
|
||||||
"element": "Date",
|
"element": "Date",
|
||||||
"format_helper": "JJ/MM/AAAA",
|
"format_helper": "JJ/MM/AAAA",
|
||||||
"remove": "Supprimer la date",
|
"remove": "Supprimer date",
|
||||||
"add_time": "Ajouter une plage horaire",
|
"add_time": "Ajouter une plage horaire",
|
||||||
"empty": "Vider",
|
"empty": "Vider",
|
||||||
"count_dates": "choix de dates",
|
"count_dates": "choix de dates",
|
||||||
@ -190,6 +190,8 @@
|
|||||||
"network_error": "erreur de réseau",
|
"network_error": "erreur de réseau",
|
||||||
"go_back": "Revenir en arrière",
|
"go_back": "Revenir en arrière",
|
||||||
"copy": "Copier",
|
"copy": "Copier",
|
||||||
|
"deleted_option": "Option supprimée",
|
||||||
|
"deleted_day": "Date supprimée",
|
||||||
"copy_message": "Texte copié :"
|
"copy_message": "Texte copié :"
|
||||||
},
|
},
|
||||||
"visibility": {
|
"visibility": {
|
||||||
|
Loading…
Reference in New Issue
Block a user