From 287fe5802e435bc9c92154fe6f6f8adb664ee0a7 Mon Sep 17 00:00:00 2001 From: "mathias.chouet" <mathias.chouet@irstea.fr> Date: Mon, 18 Feb 2019 16:15:53 +0100 Subject: [PATCH] =?UTF-8?q?Liste=20des=20modules=20de=20calcul:=20les=20bo?= =?UTF-8?q?utons=20de=20cr=C3=A9ation=20portent=20l'ID=20du=20type=20de=20?= =?UTF-8?q?module?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../calculator-list/calculator-list.component.html | 2 +- .../components/calculator-list/calculator-list.component.ts | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/app/components/calculator-list/calculator-list.component.html b/src/app/components/calculator-list/calculator-list.component.html index 925ebed11..25c88f025 100644 --- a/src/app/components/calculator-list/calculator-list.component.html +++ b/src/app/components/calculator-list/calculator-list.component.html @@ -24,7 +24,7 @@ <mat-card-actions> <div class="container" fxLayout="column" fxLayoutAlign="left" fxLayoutGap="10px"> <button mat-raised-button color="accent" *ngFor="let calc of theme.calculators" class="theme-calculator" - (click)="create(calc.type)" [innerHTML]="calc.label"></button> + (click)="create(calc.type)" [innerHTML]="calc.label" [id]="calc.buttonId"></button> </div> </mat-card-actions> diff --git a/src/app/components/calculator-list/calculator-list.component.ts b/src/app/components/calculator-list/calculator-list.component.ts index aef92e3e1..4a084aa81 100644 --- a/src/app/components/calculator-list/calculator-list.component.ts +++ b/src/app/components/calculator-list/calculator-list.component.ts @@ -50,7 +50,8 @@ export class CalculatorListComponent implements OnInit { for (const calcType of theme.calculators) { item.calculators.push({ type: calcType, - label: ServiceFactory.instance.formulaireService.getLocalisedTitleFromCalculatorType(calcType) + label: ServiceFactory.instance.formulaireService.getLocalisedTitleFromCalculatorType(calcType), + buttonId: "create-calc-" + calcType }); // mark as used const index = unusedCalculators.indexOf(calcType); @@ -77,7 +78,8 @@ export class CalculatorListComponent implements OnInit { if (t !== CalculatorType.Structure) { unusedTheme.calculators.push({ type: t, - label: ServiceFactory.instance.formulaireService.getLocalisedTitleFromCalculatorType(t) + label: ServiceFactory.instance.formulaireService.getLocalisedTitleFromCalculatorType(t), + buttonId: "create-calc-" + t }); } } -- GitLab