From a9955e7ea63a5876052760f209154bd0f9532154 Mon Sep 17 00:00:00 2001 From: "mathias.chouet" <mathias.chouet@irstea.fr> Date: Mon, 29 Apr 2019 11:18:35 +0200 Subject: [PATCH] =?UTF-8?q?M=C3=A0J=20jalhyd#74=20:=20r=C3=A9glage=20des?= =?UTF-8?q?=20param=C3=A8tres=20non=20calculables=20de=20Cloisons=20et=20D?= =?UTF-8?q?=C3=A9versoirs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../calculators/cloisons/cloisons.config.json | 3 ++ src/app/calculators/dever/dever.config.json | 2 ++ .../param-field-line.component.ts | 31 +------------------ src/app/formulaire/ngparam.ts | 2 +- 4 files changed, 7 insertions(+), 31 deletions(-) diff --git a/src/app/calculators/cloisons/cloisons.config.json b/src/app/calculators/cloisons/cloisons.config.json index 958fb294b..cb9fff4b6 100644 --- a/src/app/calculators/cloisons/cloisons.config.json +++ b/src/app/calculators/cloisons/cloisons.config.json @@ -19,16 +19,19 @@ { "type": "input", "id": "LB", + "option": "var", "unit": "m" }, { "type": "input", "id": "BB", + "option": "var", "unit": "m" }, { "type": "input", "id": "PB", + "option": "var", "unit": "m" }, { diff --git a/src/app/calculators/dever/dever.config.json b/src/app/calculators/dever/dever.config.json index 99fe3d026..cb24d0423 100644 --- a/src/app/calculators/dever/dever.config.json +++ b/src/app/calculators/dever/dever.config.json @@ -19,11 +19,13 @@ { "type": "input", "id": "BR", + "option": "var", "unit": "m" }, { "type": "input", "id": "ZR", + "option": "var", "unit": "m" } ] diff --git a/src/app/components/param-field-line/param-field-line.component.ts b/src/app/components/param-field-line/param-field-line.component.ts index 59b38594a..8aae7a7c7 100644 --- a/src/app/components/param-field-line/param-field-line.component.ts +++ b/src/app/components/param-field-line/param-field-line.component.ts @@ -4,7 +4,7 @@ import { I18nService } from "../../services/internationalisation/internationalis import { NgParameter, ParamRadioConfig } from "../../formulaire/ngparam"; import { NgParamInputComponent } from "../ngparam-input/ngparam-input.component"; import { ServiceFactory } from "../../services/service-factory"; -import { ParamValueMode, ParallelStructure, Nub } from "jalhyd"; +import { ParamValueMode, ParallelStructure } from "jalhyd"; import { FormulaireService } from "../../services/formulaire/formulaire.service"; import { ParamLinkComponent } from "../param-link/param-link.component"; import { ParamComputedComponent } from "../param-computed/param-computed.component"; @@ -45,28 +45,6 @@ export class ParamFieldLineComponent implements OnChanges { return this.intlService.localizeText("INFO_PARAMFIELD_PARAMLIE"); } - /** - * Parameter symbol (Q, Ks, B, ...) input attribute - */ - private get symbol(): string { - return this.param.symbol; - } - - // états des boutons pour l'interface - - private get radioFixCheck(): string { - return this.isRadioFixChecked ? "checked" : undefined; - } - private get radioVarCheck(): string { - return this.isRadioVarChecked ? "checked" : undefined; - } - private get radioCalCheck(): string { - return this.isRadioCalChecked ? "checked" : undefined; - } - private get radioLinkCheck(): string { - return this.isRadioLinkChecked ? "checked" : undefined; - } - // états booléens des boutons public get isRadioFixChecked(): boolean { @@ -149,13 +127,6 @@ export class ParamFieldLineComponent implements OnChanges { @Output() private radio = new EventEmitter<any>(); - /** - * classe du radio "fixé" - */ - private on = true; - private onClass = "btn-on"; - private offClass = "btn-off"; - /** * calcule la présence du radio "paramètre fixé" */ diff --git a/src/app/formulaire/ngparam.ts b/src/app/formulaire/ngparam.ts index 3f9f58711..5681b58cd 100644 --- a/src/app/formulaire/ngparam.ts +++ b/src/app/formulaire/ngparam.ts @@ -405,7 +405,7 @@ export class NgParameter extends InputField implements Observer { } public parseConfig(json: {}, data?: {}) { - const radioConfig: string = data["radioConfig"]; + const radioConfig: string = json["option"] || data["radioConfig"]; this._confId = json["id"]; this.unit = json["unit"]; -- GitLab