Skip to content
Snippets Groups Projects
Commit 0c97460f authored by mathias.chouet's avatar mathias.chouet
Browse files

Removed "input" from config, made it the default field type

parent 5dcfe543
No related branches found
No related tags found
1 merge request!53Resolve "Déplacer au maximum la configuration d'un module vers JaLHyd"
Showing
with 2 additions and 114 deletions
......@@ -6,31 +6,25 @@
"option": "cal",
"fields": [
{
"type": "input",
"id": "Q"
},
{
"type": "input",
"id": "Z1",
"option": "var"
},
{
"type": "input",
"id": "LB",
"option": "var"
},
{
"type": "input",
"id": "BB",
"option": "var"
},
{
"type": "input",
"id": "PB",
"option": "var"
},
{
"type": "input",
"id": "DH"
}
]
......@@ -55,31 +49,24 @@
"source": "device_loi_debit"
},
{
"type": "input",
"id": "h1"
},
{
"type": "input",
"id": "L"
},
{
"type": "input",
"id": "Cd"
},
{
"type": "input",
"id": "S"
},
{
"type": "input",
"id": "alpha2"
},
{
"type": "input",
"id": "BT"
},
{
"type": "input",
"id": "ZT"
}
]
......
......@@ -5,23 +5,18 @@
"option": "cal",
"fields": [
{
"type": "input",
"id": "Q"
},
{
"type": "input",
"id": "D"
},
{
"type": "input",
"id": "J"
},
{
"type": "input",
"id": "Lg"
},
{
"type": "input",
"id": "Nu"
}
]
......
......@@ -6,20 +6,16 @@
"option": "cal",
"fields": [
{
"type": "input",
"id": "Q"
},
{
"type": "input",
"id": "Z1"
},
{
"type": "input",
"id": "BR",
"option": "var"
},
{
"type": "input",
"id": "ZR",
"option": "var"
}
......@@ -45,27 +41,21 @@
"source": "device_loi_debit"
},
{
"type": "input",
"id": "ZDV"
},
{
"type": "input",
"id": "L"
},
{
"type": "input",
"id": "Cd"
},
{
"type": "input",
"id": "alpha2"
},
{
"type": "input",
"id": "BT"
},
{
"type": "input",
"id": "ZT"
}
]
......
......@@ -10,15 +10,12 @@
"source": "lechapt_calmon_material"
},
{
"type": "input",
"id": "L"
},
{
"type": "input",
"id": "M"
},
{
"type": "input",
"id": "N"
}
]
......@@ -29,19 +26,15 @@
"option": "cal",
"fields": [
{
"type": "input",
"id": "Q"
},
{
"type": "input",
"id": "D"
},
{
"type": "input",
"id": "J"
},
{
"type": "input",
"id": "Lg"
}
]
......
......@@ -5,15 +5,12 @@
"option": "var",
"fields": [
{
"type": "input",
"id": "ZF1"
},
{
"type": "input",
"id": "L"
},
{
"type": "input",
"id": "Ks"
}
]
......@@ -24,23 +21,18 @@
"option": "cal",
"fields": [
{
"type": "input",
"id": "B"
},
{
"type": "input",
"id": "If"
},
{
"type": "input",
"id": "Q"
},
{
"type": "input",
"id": "Y"
},
{
"type": "input",
"id": "C"
}
]
......@@ -51,15 +43,12 @@
"option": "var",
"fields": [
{
"type": "input",
"id": "PBD"
},
{
"type": "input",
"id": "PBH"
},
{
"type": "input",
"id": "Cd0"
}
]
......
......@@ -5,15 +5,12 @@
"option": "cal",
"fields": [
{
"type": "input",
"id": "Z1"
},
{
"type": "input",
"id": "Z2"
},
{
"type": "input",
"id": "DH"
}
]
......
......@@ -5,19 +5,15 @@
"option": "cal",
"fields": [
{
"type": "input",
"id": "L"
},
{
"type": "input",
"id": "W"
},
{
"type": "input",
"id": "Y"
},
{
"type": "input",
"id": "V"
}
]
......
......@@ -5,15 +5,12 @@
"option": "cal",
"fields": [
{
"type": "input",
"id": "DHT"
},
{
"type": "input",
"id": "N"
},
{
"type": "input",
"id": "DH"
}
]
......
......@@ -5,19 +5,15 @@
"option": "cal",
"fields": [
{
"type": "input",
"id": "DH"
},
{
"type": "input",
"id": "Q"
},
{
"type": "input",
"id": "V"
},
{
"type": "input",
"id": "PV"
}
]
......
......@@ -6,15 +6,12 @@
"option": "cal",
"fields": [
{
"type": "input",
"id": "Q"
},
{
"type": "input",
"id": "Z1"
},
{
"type": "input",
"id": "Z2",
"option": "var"
}
......
......@@ -6,15 +6,12 @@
"option": "cal",
"fields": [
{
"type": "input",
"id": "Q"
},
{
"type": "input",
"id": "Z1"
},
{
"type": "input",
"id": "Z2"
}
]
......@@ -39,55 +36,42 @@
"source": "device_loi_debit"
},
{
"type": "input",
"id": "ZDV"
},
{
"type": "input",
"id": "L"
},
{
"type": "input",
"id": "W"
},
{
"type": "input",
"id": "CdWSL"
},
{
"type": "input",
"id": "CdWR"
},
{
"type": "input",
"id": "CdGR"
},
{
"type": "input",
"id": "CdT"
},
{
"type": "input",
"id": "alpha"
},
{
"type": "input",
"id": "beta"
},
{
"type": "input",
"id": "ZRAM"
},
{
"type": "input",
"id": "alpha2"
},
{
"type": "input",
"id": "BT"
},
{
"type": "input",
"id": "ZT"
}
]
......
......@@ -10,23 +10,18 @@
"source": "acsection_section"
},
{
"type": "input",
"id": "LargeurFond"
},
{
"type": "input",
"id": "Fruit"
},
{
"type": "input",
"id": "LargeurBerge"
},
{
"type": "input",
"id": "D"
},
{
"type": "input",
"id": "k"
}
]
......@@ -37,15 +32,12 @@
"option": "cal",
"fields": [
{
"type": "input",
"id": "Ks"
},
{
"type": "input",
"id": "If"
},
{
"type": "input",
"id": "YB"
}
]
......@@ -56,11 +48,9 @@
"option": "cal",
"fields": [
{
"type": "input",
"id": "Q"
},
{
"type": "input",
"id": "Y"
}
]
......
......@@ -10,23 +10,18 @@
"source": "acsection_section"
},
{
"type": "input",
"id": "LargeurFond"
},
{
"type": "input",
"id": "Fruit"
},
{
"type": "input",
"id": "LargeurBerge"
},
{
"type": "input",
"id": "D"
},
{
"type": "input",
"id": "k"
}
]
......@@ -37,19 +32,15 @@
"option": "fix",
"fields": [
{
"type": "input",
"id": "Ks"
},
{
"type": "input",
"id": "Long"
},
{
"type": "input",
"id": "If"
},
{
"type": "input",
"id": "YB"
}
]
......@@ -60,15 +51,12 @@
"option": "fix",
"fields": [
{
"type": "input",
"id": "Q"
},
{
"type": "input",
"id": "Yaval"
},
{
"type": "input",
"id": "Yamont"
}
]
......@@ -79,11 +67,9 @@
"option": "fix",
"fields": [
{
"type": "input",
"id": "Dx"
},
{
"type": "input",
"id": "Pr"
},
{
......
......@@ -10,23 +10,18 @@
"source": "acsection_section"
},
{
"type": "input",
"id": "LargeurBerge"
},
{
"type": "input",
"id": "LargeurFond"
},
{
"type": "input",
"id": "Fruit"
},
{
"type": "input",
"id": "D"
},
{
"type": "input",
"id": "k"
}
]
......@@ -37,15 +32,12 @@
"option": "var",
"fields": [
{
"type": "input",
"id": "Ks"
},
{
"type": "input",
"id": "If"
},
{
"type": "input",
"id": "YB"
}
]
......@@ -56,11 +48,9 @@
"option": "var",
"fields": [
{
"type": "input",
"id": "Q"
},
{
"type": "input",
"id": "Y"
}
]
......
......@@ -133,9 +133,10 @@ export class FieldSet extends FormulaireElement implements Observer {
const fields = this._jsonConfig["fields"];
for (const field_index in fields) {
const field = fields[field_index];
const type = field["type"] || "input"; // "input" by default
let param: Field;
switch (field["type"]) {
switch (type) {
case "input":
const default_radio_config = this._jsonConfig["option"];
param = this.parse_input(field, default_radio_config);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment