4-xx simplification accès tableau objets
This commit is contained in:
parent
b83cc881f2
commit
57221ed851
293
paheko.side
293
paheko.side
@ -6637,20 +6637,6 @@
|
||||
"target": "function trier(tnumeros, tnoms, croissant = true){ let tab = []; for (let i = 0; i < tnumeros.length; ++i) { let o = Object(); o.numero = tnumeros[i]; o.nom = tnoms[i]; tab.push(o); } ordre = croissant ? 1 : -1; tab.sort((a, b) => { return ordre * (a.numero - b.numero); }); return tab;} return trier(${lesnumeros}, ${lesnoms})",
|
||||
"targets": [],
|
||||
"value": "membres_asc"
|
||||
}, {
|
||||
"id": "3c36d9b8-eba6-4284-b928-e4a36c7b12ce",
|
||||
"comment": "Récupérer les noms",
|
||||
"command": "executeScript",
|
||||
"target": "function extraire(tab){ let resu = []; tab.forEach((e) => { resu.push(e.nom); }); return resu;} return extraire(${membres_asc})",
|
||||
"targets": [],
|
||||
"value": "lesnoms_asc"
|
||||
}, {
|
||||
"id": "ef6db12a-88aa-45c1-b22d-4a3315d876f9",
|
||||
"comment": "Récupérer les numéros",
|
||||
"command": "executeScript",
|
||||
"target": "function extraire(tab){ let resu = []; tab.forEach((e) => { resu.push(e.numero); }); return resu;} return extraire(${membres_asc})",
|
||||
"targets": [],
|
||||
"value": "lesnumeros_asc"
|
||||
}, {
|
||||
"id": "e84077f6-9802-4529-b6bb-dd0cbe1aeb4a",
|
||||
"comment": "Vérifier les membres",
|
||||
@ -6865,14 +6851,14 @@
|
||||
"id": "d058737f-0fed-4d12-a472-120c811851f5",
|
||||
"comment": "numéro mémorisé",
|
||||
"command": "executeScript",
|
||||
"target": "return ${lesnumeros_asc}.at(${i})",
|
||||
"target": "return ${membres_asc}[${i}].numero",
|
||||
"targets": [],
|
||||
"value": "numero"
|
||||
}, {
|
||||
"id": "7018c3d9-7f40-460d-9905-856e25ba15ce",
|
||||
"comment": "nom mémorisé",
|
||||
"command": "executeScript",
|
||||
"target": "return ${lesnoms_asc}.at(${i})",
|
||||
"target": "return ${membres_asc}[${i}].nom",
|
||||
"targets": [],
|
||||
"value": "nom"
|
||||
}, {
|
||||
@ -9346,20 +9332,6 @@
|
||||
"target": "function trierNoms(tnoms, tnumeros, croissant = true) { let tab = []; for (let i = 0; i < tnoms.length; ++i) { let o = Object(); o.nom = tnoms[i]; o.numero = tnumeros[i]; tab.push(o); } tab.sort((a, b) => { if (! croissant) { [a, b] = [b, a]; } let comp = a.nom.localeCompare(b.nom); if (comp == 0) { comp = a.numero - b.numero; } return comp; }); return tab; } return trierNoms(${lesnoms}, ${lesnumeros});",
|
||||
"targets": [],
|
||||
"value": "membres_alpha"
|
||||
}, {
|
||||
"id": "e17bbbd2-5468-4aff-a35d-f50728b59718",
|
||||
"comment": "Récupérer les noms",
|
||||
"command": "executeScript",
|
||||
"target": "function extraire(tab) { let resu = []; tab.forEach((e) => { resu.push(e.nom); }); return resu; } return extraire(${membres_alpha})",
|
||||
"targets": [],
|
||||
"value": "lesnoms_alpha"
|
||||
}, {
|
||||
"id": "ddbe0044-8e6e-4188-90fa-53893ed54ea8",
|
||||
"comment": "Récupérer les numéros",
|
||||
"command": "executeScript",
|
||||
"target": "function extraire(tab){ let resu = []; tab.forEach((e) => { resu.push(e.numero); }); return resu;} return extraire(${membres_alpha})",
|
||||
"targets": [],
|
||||
"value": "lesnumeros_alpha"
|
||||
}, {
|
||||
"id": "463f6e21-e4d4-4486-85e3-358d327b0406",
|
||||
"comment": "Vérifier les membres",
|
||||
@ -9560,14 +9532,14 @@
|
||||
"id": "4295f50c-5918-4411-88cc-ce0f8a580780",
|
||||
"comment": "numéro mémorisé",
|
||||
"command": "executeScript",
|
||||
"target": "return ${lesnumeros_alpha}.at(${i})",
|
||||
"target": "return ${membres_alpha}[${i}].numero",
|
||||
"targets": [],
|
||||
"value": "numero"
|
||||
}, {
|
||||
"id": "14637acf-dcc9-4d5e-8f63-419972ef35be",
|
||||
"comment": "nom mémorisé",
|
||||
"command": "executeScript",
|
||||
"target": "return ${lesnoms_alpha}.at(${i})",
|
||||
"target": "return ${membres_alpha}[${i}].nom",
|
||||
"targets": [],
|
||||
"value": "nom"
|
||||
}, {
|
||||
@ -9991,20 +9963,6 @@
|
||||
"target": "function trierNoms(tnoms, tnumeros, croissant = true) { let tab = []; for (let i = 0; i < tnoms.length; ++i) { let o = Object(); o.nom = tnoms[i]; o.numero = tnumeros[i]; tab.push(o); } tab.sort((a, b) => { if (! croissant) { [a, b] = [b, a]; } let comp = a.nom.localeCompare(b.nom); if (comp == 0) { comp = a.numero - b.numero; } return comp; }); return tab; } return trierNoms(${lesnoms}, ${lesnumeros}, false);",
|
||||
"targets": [],
|
||||
"value": "membres_alpha"
|
||||
}, {
|
||||
"id": "60c29b14-e9d7-4c81-a7e3-ecfb2cb46cce",
|
||||
"comment": "Récupérer les noms",
|
||||
"command": "executeScript",
|
||||
"target": "function extraire(tab){ let resu = []; tab.forEach((e) => { resu.push(e.nom); }); return resu;} return extraire(${membres_alpha})",
|
||||
"targets": [],
|
||||
"value": "lesnoms_alpha"
|
||||
}, {
|
||||
"id": "ac18e750-cf13-4168-8d4c-8cbedd6e2abc",
|
||||
"comment": "Récupérer les numéros",
|
||||
"command": "executeScript",
|
||||
"target": "function extraire(tab){ let resu = []; tab.forEach((e) => { resu.push(e.numero); }); return resu;} return extraire(${membres_alpha})",
|
||||
"targets": [],
|
||||
"value": "lesnumeros_alpha"
|
||||
}, {
|
||||
"id": "7beea25f-a0cb-4e72-92cf-b7c74d9d06c7",
|
||||
"comment": "Vérifier les membres",
|
||||
@ -10205,14 +10163,14 @@
|
||||
"id": "5470f252-f104-4c56-9a1b-4e6e2ce7c148",
|
||||
"comment": "numéro mémorisé",
|
||||
"command": "executeScript",
|
||||
"target": "return ${lesnumeros_alpha}.at(${i})",
|
||||
"target": "return ${membres_alpha}[${i}].numero",
|
||||
"targets": [],
|
||||
"value": "numero"
|
||||
}, {
|
||||
"id": "d72c9c26-7078-42e8-8f25-2ccbfe629da5",
|
||||
"comment": "nom mémorisé",
|
||||
"command": "executeScript",
|
||||
"target": "return ${lesnoms_alpha}.at(${i})",
|
||||
"target": "return ${membres_alpha}[${i}].nom",
|
||||
"targets": [],
|
||||
"value": "nom"
|
||||
}, {
|
||||
@ -10636,20 +10594,6 @@
|
||||
"target": "function trier(tnumeros, tnoms, croissant = true){ let tab = []; for (let i = 0; i < tnumeros.length; ++i) { let o = Object(); o.numero = tnumeros[i]; o.nom = tnoms[i]; tab.push(o); } ordre = croissant ? 1 : -1; tab.sort((a, b) => { return ordre * (a.numero - b.numero); }); return tab;} return trier(${lesnumeros}, ${lesnoms}, false)",
|
||||
"targets": [],
|
||||
"value": "membres_dec"
|
||||
}, {
|
||||
"id": "90e65336-d350-41f5-b750-a9c35048204e",
|
||||
"comment": "Récupérer les noms",
|
||||
"command": "executeScript",
|
||||
"target": "function extraire(tab){ let resu = []; tab.forEach((e) => { resu.push(e.nom); }); return resu;} return extraire(${membres_dec})",
|
||||
"targets": [],
|
||||
"value": "lesnoms_dec"
|
||||
}, {
|
||||
"id": "87b363c9-1675-46e2-a46e-f818e5d27182",
|
||||
"comment": "Récupérer les numéros",
|
||||
"command": "executeScript",
|
||||
"target": "function extraire(tab){ let resu = []; tab.forEach((e) => { resu.push(e.numero); }); return resu;} return extraire(${membres_dec})",
|
||||
"targets": [],
|
||||
"value": "lesnumeros_dec"
|
||||
}, {
|
||||
"id": "ed0753f7-c502-4c4a-bc5d-11d95d15c178",
|
||||
"comment": "Vérifier les membres",
|
||||
@ -10864,14 +10808,14 @@
|
||||
"id": "193522ae-e9bb-4efb-9614-6fff2b502da1",
|
||||
"comment": "numéro mémorisé",
|
||||
"command": "executeScript",
|
||||
"target": "return ${lesnumeros_dec}.at(${i})",
|
||||
"target": "return ${membres_dec}[${i}].numero",
|
||||
"targets": [],
|
||||
"value": "numero"
|
||||
}, {
|
||||
"id": "568c2020-8fe2-4672-9658-e30731cca3b2",
|
||||
"comment": "nom mémorisé",
|
||||
"command": "executeScript",
|
||||
"target": "return ${lesnoms_dec}.at(${i})",
|
||||
"target": "return ${membres_dec}[${i}].nom",
|
||||
"targets": [],
|
||||
"value": "nom"
|
||||
}, {
|
||||
@ -11323,20 +11267,6 @@
|
||||
"target": "function trierVilles(tvilles, tnumeros, croissant = true) { let tab = []; for (let i = 0; i < tvilles.length; ++i) { let o = Object(); o.ville = tvilles[i]; o.numero = tnumeros[i]; tab.push(o); } tab.sort((a, b) => { if (! croissant) { [a, b] = [b, a]; } if (a.ville == '' && b.ville == '') { return a.numero - b.numero; } if (a.ville == '') { return 1; } if (b.ville == '') { return -1;} let comp = a.ville.localeCompare(b.ville); if (comp == 0) { comp = a.numero - b.numero; } return comp; }); return tab; } return trierVilles(${lesvilles}, ${lesnumeros});",
|
||||
"targets": [],
|
||||
"value": "membres_ville_asc"
|
||||
}, {
|
||||
"id": "e03b7586-9eef-434c-aa84-cff0ec170a1b",
|
||||
"comment": "Récupérer les numéros",
|
||||
"command": "executeScript",
|
||||
"target": "function extraire(tab){ let resu = []; tab.forEach((e) => { resu.push(e.numero); }); return resu;} return extraire(${membres_ville_asc})",
|
||||
"targets": [],
|
||||
"value": "lesnumeros_ville_asc"
|
||||
}, {
|
||||
"id": "45fffd33-4d6d-4654-8b2e-4eab0dc961b0",
|
||||
"comment": "Récupérer les villes",
|
||||
"command": "executeScript",
|
||||
"target": "function extraire(tab){ let resu = []; tab.forEach((e) => { resu.push(e.ville); }); return resu;} return extraire(${membres_ville_asc})",
|
||||
"targets": [],
|
||||
"value": "lesvilles_asc"
|
||||
}, {
|
||||
"id": "8036e1a1-014f-4940-8757-204643cdc5c7",
|
||||
"comment": "Vérifier les membres",
|
||||
@ -11621,21 +11551,14 @@
|
||||
"id": "e7e38aad-3f41-48d6-b5b0-584371808109",
|
||||
"comment": "numéro mémorisé",
|
||||
"command": "executeScript",
|
||||
"target": "return ${lesnumeros_ville_asc}.at(${i})",
|
||||
"target": "return ${membres_ville_asc}[${i}].numero",
|
||||
"targets": [],
|
||||
"value": "numero"
|
||||
}, {
|
||||
"id": "f9d94748-2954-40e9-b7b3-ffa1f846ac65",
|
||||
"comment": "nom mémorisé",
|
||||
"command": "//executeScript",
|
||||
"target": "return ${lesnoms_ville_asc}.at(${i})",
|
||||
"targets": [],
|
||||
"value": "nom"
|
||||
}, {
|
||||
"id": "5b84e05a-d71e-4934-ba23-65e8051db558",
|
||||
"comment": "ville mémorisée",
|
||||
"command": "executeScript",
|
||||
"target": "return ${lesvilles_asc}.at(${i})",
|
||||
"target": "return ${membres_ville_asc}[${i}].ville",
|
||||
"targets": [],
|
||||
"value": "ville"
|
||||
}, {
|
||||
@ -12094,20 +12017,6 @@
|
||||
"target": "function trierVilles(tvilles, tnumeros, croissant = true) { let tab = []; for (let i = 0; i < tvilles.length; ++i) { let o = Object(); o.ville = tvilles[i]; o.numero = tnumeros[i]; tab.push(o); } tab.sort((a, b) => { if (! croissant) { [a, b] = [b, a]; } if (a.ville == '' && b.ville == '') { return a.numero - b.numero; } if (a.ville == '') { return 1; } if (b.ville == '') { return -1;} let comp = a.ville.localeCompare(b.ville); if (comp == 0) { comp = a.numero - b.numero; } return comp; }); return tab; } return trierVilles(${lesvilles}, ${lesnumeros}, false);",
|
||||
"targets": [],
|
||||
"value": "membres_ville_dec"
|
||||
}, {
|
||||
"id": "9a2f24a7-8a02-49d6-a76d-9d952f2bd72f",
|
||||
"comment": "Récupérer les numéros",
|
||||
"command": "executeScript",
|
||||
"target": "function extraire(tab){ let resu = []; tab.forEach((e) => { resu.push(e.numero); }); return resu;} return extraire(${membres_ville_dec})",
|
||||
"targets": [],
|
||||
"value": "lesnumeros_ville_dec"
|
||||
}, {
|
||||
"id": "1d207ec8-a772-4b5f-abe4-d5d752b59faf",
|
||||
"comment": "Récupérer les villes",
|
||||
"command": "executeScript",
|
||||
"target": "function extraire(tab){ let resu = []; tab.forEach((e) => { resu.push(e.ville); }); return resu;} return extraire(${membres_ville_dec})",
|
||||
"targets": [],
|
||||
"value": "lesvilles_dec"
|
||||
}, {
|
||||
"id": "50cea963-0984-4735-aeb7-7327ce169087",
|
||||
"comment": "Vérifier les membres",
|
||||
@ -12392,21 +12301,14 @@
|
||||
"id": "0eecd8a3-4dda-4938-901a-19f1eb497add",
|
||||
"comment": "numéro mémorisé",
|
||||
"command": "executeScript",
|
||||
"target": "return ${lesnumeros_ville_dec}.at(${i})",
|
||||
"target": "return ${membres_ville_dec}[${i}].numero",
|
||||
"targets": [],
|
||||
"value": "numero"
|
||||
}, {
|
||||
"id": "bd0d55b3-06fa-4a27-968c-951e1487aedc",
|
||||
"comment": "nom mémorisé",
|
||||
"command": "//executeScript",
|
||||
"target": "return ${lesnoms_ville_dec}.at(${i})",
|
||||
"targets": [],
|
||||
"value": "nom"
|
||||
}, {
|
||||
"id": "7ede4f3f-814c-4ba0-a421-575b26e183c1",
|
||||
"comment": "ville mémorisée",
|
||||
"command": "executeScript",
|
||||
"target": "return ${lesvilles_dec}.at(${i})",
|
||||
"target": "return ${membres_ville_dec}[${i}].ville",
|
||||
"targets": [],
|
||||
"value": "ville"
|
||||
}, {
|
||||
@ -13006,27 +12908,6 @@
|
||||
"target": "function trierParents(tparents, tnoms, tnumeros, croissant = true){ let tab = []; for (let i = 0; i < tnumeros.length; ++i) { let o = Object(); o.numero = tnumeros[i]; o.nom = tnoms[i]; o.parent = tparents[i]; tab.push(o); } tab.sort((a, b) => { ordre = croissant ? 1 : -1; if (a.parent == '' && b.parent == '') { let comp = a.nom.localeCompare(b.nom); if (comp == 0) { comp = a.numero - b.numero; } return comp * ordre; } if (a.parent == '') { return 1; } if (b.parent == '') { return -1; } let comp = a.parent.localeCompare(b.parent); if (comp == 0) { comp = a.nom.localeCompare(b.nom); } if (comp == 0) { comp = a.numero - b.numero; } return comp * ordre; }); return tab;} return trierParents(${lesparents}, ${lesnoms}, ${lesnumeros});",
|
||||
"targets": [],
|
||||
"value": "membres_parent_asc"
|
||||
}, {
|
||||
"id": "5bfc0a04-b9fd-42b5-89df-450a7b65bbd1",
|
||||
"comment": "Récupérer les noms",
|
||||
"command": "executeScript",
|
||||
"target": "function extraire(tab){ let resu = []; tab.forEach((e) => { resu.push(e.nom); }); return resu;} return extraire(${membres_parent_asc})",
|
||||
"targets": [],
|
||||
"value": "lesnoms_parent_asc"
|
||||
}, {
|
||||
"id": "a8c047d4-89fc-4731-a6f7-a033a22793b4",
|
||||
"comment": "Récupérer les numéros",
|
||||
"command": "executeScript",
|
||||
"target": "function extraire(tab){ let resu = []; tab.forEach((e) => { resu.push(e.numero); }); return resu;} return extraire(${membres_parent_asc})",
|
||||
"targets": [],
|
||||
"value": "lesnumeros_parent_asc"
|
||||
}, {
|
||||
"id": "ff717459-25ec-4d3b-b35f-e40f9ec7a6f4",
|
||||
"comment": "Récupérer les parents",
|
||||
"command": "executeScript",
|
||||
"target": "function extraire(tab){ let resu = []; tab.forEach((e) => { resu.push(e.parent); }); return resu;} return extraire(${membres_parent_asc})",
|
||||
"targets": [],
|
||||
"value": "lesparents_asc"
|
||||
}, {
|
||||
"id": "aee6536a-c9e3-4fa7-ad95-7fedcfb28b8d",
|
||||
"comment": "Vérifier les membres",
|
||||
@ -13332,21 +13213,21 @@
|
||||
"id": "f8dbe728-797b-4ccf-8818-824bda5a8de4",
|
||||
"comment": "numéro mémorisé",
|
||||
"command": "executeScript",
|
||||
"target": "return ${lesnumeros_parent_asc}.at(${i})",
|
||||
"target": "return ${membres_parent_asc}[${i}].numero",
|
||||
"targets": [],
|
||||
"value": "numero"
|
||||
}, {
|
||||
"id": "88ead84c-1e37-4e66-985f-b6178e46a392",
|
||||
"comment": "nom mémorisé",
|
||||
"command": "executeScript",
|
||||
"target": "return ${lesnoms_parent_asc}.at(${i})",
|
||||
"target": "return ${membres_parent_asc}[${i}].nom",
|
||||
"targets": [],
|
||||
"value": "nom"
|
||||
}, {
|
||||
"id": "4b093be5-ddff-4497-93ac-750162617c13",
|
||||
"comment": "parent mémorisée",
|
||||
"command": "executeScript",
|
||||
"target": "return ${lesparents_asc}.at(${i})",
|
||||
"target": "return ${membres_parent_asc}[${i}].parent",
|
||||
"targets": [],
|
||||
"value": "parent"
|
||||
}, {
|
||||
@ -14016,90 +13897,6 @@
|
||||
"target": "function trierParents(tparents, tnoms, tnumeros, croissant = true){ let tab = []; for (let i = 0; i < tnumeros.length; ++i) { let o = Object(); o.numero = tnumeros[i]; o.nom = tnoms[i]; o.parent = tparents[i]; tab.push(o); } tab.sort((a, b) => { ordre = croissant ? 1 : -1; if (a.parent == '' && b.parent == '') { let comp = a.nom.localeCompare(b.nom); if (comp == 0) { comp = a.numero - b.numero; } return comp * ordre; } if (a.parent == '') { return 1; } if (b.parent == '') { return -1; } let comp = a.parent.localeCompare(b.parent); if (comp == 0) { comp = a.nom.localeCompare(b.nom); } if (comp == 0) { comp = a.numero - b.numero; } return comp * ordre; }); return tab;} return trierParents(${lesparents}, ${lesnoms}, ${lesnumeros}, false);",
|
||||
"targets": [],
|
||||
"value": "membres_parent_dec"
|
||||
}, {
|
||||
"id": "437bf3c8-52ce-4bbe-9742-0c3854091551",
|
||||
"comment": "Récupérer les noms",
|
||||
"command": "executeScript",
|
||||
"target": "function extraire(tab){ let resu = []; tab.forEach((e) => { resu.push(e.nom); }); return resu;} return extraire(${membres_parent_dec})",
|
||||
"targets": [],
|
||||
"value": "lesnoms_parent_dec"
|
||||
}, {
|
||||
"id": "1ef096f6-ea12-4416-bdb3-35dfd80940d4",
|
||||
"comment": "Récupérer les numéros",
|
||||
"command": "executeScript",
|
||||
"target": "function extraire(tab){ let resu = []; tab.forEach((e) => { resu.push(e.numero); }); return resu;} return extraire(${membres_parent_dec})",
|
||||
"targets": [],
|
||||
"value": "lesnumeros_parent_dec"
|
||||
}, {
|
||||
"id": "9dfbc97f-e514-410b-bb83-6a5e6d9e4f13",
|
||||
"comment": "Récupérer les parents",
|
||||
"command": "executeScript",
|
||||
"target": "function extraire(tab){ let resu = []; tab.forEach((e) => { resu.push(e.parent); }); return resu;} return extraire(${membres_parent_dec})",
|
||||
"targets": [],
|
||||
"value": "lesparents_dec"
|
||||
}, {
|
||||
"id": "1a71ab3e-6333-40f4-b79d-d5972216f3a3",
|
||||
"comment": "Afficher les infos triées par parent décroissant",
|
||||
"command": "//echo",
|
||||
"target": "Afficher les infos triées par parent décroissant",
|
||||
"targets": [],
|
||||
"value": ""
|
||||
}, {
|
||||
"id": "d82c92cc-5562-4689-91ab-56b5261428cf",
|
||||
"comment": "",
|
||||
"command": "//executeScript",
|
||||
"target": "return 0",
|
||||
"targets": [],
|
||||
"value": "i"
|
||||
}, {
|
||||
"id": "ff9c92e0-a649-460c-a99c-94234c7120d2",
|
||||
"comment": "",
|
||||
"command": "//while",
|
||||
"target": "${i} < ${lesnumeros_parent_dec}.length",
|
||||
"targets": [],
|
||||
"value": ""
|
||||
}, {
|
||||
"id": "31dbf1e7-1a74-4fe8-94f0-eb4b1cac341c",
|
||||
"comment": "",
|
||||
"command": "//executeScript",
|
||||
"target": "return ${lesnumeros_parent_dec}.at(${i})",
|
||||
"targets": [],
|
||||
"value": "num"
|
||||
}, {
|
||||
"id": "7b0420aa-2032-459e-9597-816208574c1c",
|
||||
"comment": "",
|
||||
"command": "//executeScript",
|
||||
"target": "return ${lesnoms_parent_dec}.at(${i})",
|
||||
"targets": [],
|
||||
"value": "nom"
|
||||
}, {
|
||||
"id": "265c7b2d-abdc-46d5-a15b-90c6543f0018",
|
||||
"comment": "",
|
||||
"command": "//executeScript",
|
||||
"target": "return ${lesparents_dec}.at(${i})",
|
||||
"targets": [],
|
||||
"value": "parent"
|
||||
}, {
|
||||
"id": "3a1b4c92-61ee-437e-bab9-16a72589c5b7",
|
||||
"comment": "",
|
||||
"command": "//echo",
|
||||
"target": "${num} : ${nom}, ${parent}",
|
||||
"targets": [],
|
||||
"value": ""
|
||||
}, {
|
||||
"id": "c3436643-53b3-4379-9014-541b307c0ecf",
|
||||
"comment": "",
|
||||
"command": "//executeScript",
|
||||
"target": "return ${i} + 1",
|
||||
"targets": [],
|
||||
"value": "i"
|
||||
}, {
|
||||
"id": "33360869-ba17-4ac8-a478-857af48d4bbc",
|
||||
"comment": "",
|
||||
"command": "//end",
|
||||
"target": "",
|
||||
"targets": [],
|
||||
"value": ""
|
||||
}, {
|
||||
"id": "5cf11199-9c60-4e5f-a94c-f1ed064420d4",
|
||||
"comment": "Vérifier les membres",
|
||||
@ -14405,21 +14202,21 @@
|
||||
"id": "26cbdb1a-c2b1-4762-96a8-bde6e33fef1d",
|
||||
"comment": "numéro mémorisé",
|
||||
"command": "executeScript",
|
||||
"target": "return ${lesnumeros_parent_dec}.at(${i})",
|
||||
"target": "return ${membres_parent_dec}[${i}].numero",
|
||||
"targets": [],
|
||||
"value": "numero"
|
||||
}, {
|
||||
"id": "75028fcb-ab4e-45c9-83d5-3ebf04aa8d37",
|
||||
"comment": "nom mémorisé",
|
||||
"command": "executeScript",
|
||||
"target": "return ${lesnoms_parent_dec}.at(${i})",
|
||||
"target": "return ${membres_parent_dec}[${i}].nom",
|
||||
"targets": [],
|
||||
"value": "nom"
|
||||
}, {
|
||||
"id": "ec8a8094-ae99-46e7-88bd-9ba2e80ce843",
|
||||
"comment": "parent mémorisée",
|
||||
"command": "executeScript",
|
||||
"target": "return ${lesparents_dec}.at(${i})",
|
||||
"target": "return ${membres_parent_dec}[${i}].parent",
|
||||
"targets": [],
|
||||
"value": "parent"
|
||||
}, {
|
||||
@ -15171,27 +14968,6 @@
|
||||
"target": "function trierResp(tresp, tnoms, tnumeros, croissant = true) { let tab = []; for (let i = 0; i < tnumeros.length; ++i) { let o = Object(); o.numero = tnumeros[i]; o.nom = tnoms[i]; o.resp = tresp[i]; tab.push(o); } tab.sort((a, b) => { ordre = croissant ? 1 : -1; if (a.resp == '' && b.resp == '') { let comp = a.nom.localeCompare(b.nom); if (comp == 0) { comp = a.numero - b.numero; } return comp * ordre; } if (a.resp == '') { return 1; } if (b.resp == '') { return -1; } let comp = a.resp.localeCompare(b.resp); if (comp == 0) { comp = a.nom.localeCompare(b.nom); } if (comp == 0) { comp = a.numero - b.numero; } return comp * ordre; }); return tab; } return trierResp(${lesresponsables}, ${lesnoms}, ${lesnumeros})",
|
||||
"targets": [],
|
||||
"value": "membres_resp_asc"
|
||||
}, {
|
||||
"id": "e8a93fc1-83be-47ee-b999-c0f7b4e9359d",
|
||||
"comment": "Récupérer les noms",
|
||||
"command": "executeScript",
|
||||
"target": "function extraire(tab){ let resu = []; tab.forEach((e) => { resu.push(e.nom); }); return resu;} return extraire(${membres_resp_asc})",
|
||||
"targets": [],
|
||||
"value": "lesnoms_resp_asc"
|
||||
}, {
|
||||
"id": "b8187c6b-86ba-4dd2-9c0c-6c8cf15775d0",
|
||||
"comment": "Récupérer les numéros",
|
||||
"command": "executeScript",
|
||||
"target": "function extraire(tab){ let resu = []; tab.forEach((e) => { resu.push(e.numero); }); return resu;} return extraire(${membres_resp_asc})",
|
||||
"targets": [],
|
||||
"value": "lesnumeros_resp_asc"
|
||||
}, {
|
||||
"id": "aa093815-4b73-4316-8690-d08618154961",
|
||||
"comment": "Récupérer les responsables",
|
||||
"command": "executeScript",
|
||||
"target": "function extraire(tab){ let resu = []; tab.forEach((e) => { resu.push(e.resp); }); return resu;} return extraire(${membres_resp_asc})",
|
||||
"targets": [],
|
||||
"value": "lesresponsables_asc"
|
||||
}, {
|
||||
"id": "40a67fad-f745-4cc5-bc36-d215008028f7",
|
||||
"comment": "Afficher le résultat du tri",
|
||||
@ -15490,21 +15266,21 @@
|
||||
"id": "eeca502f-0667-45ea-8d42-b7671bde5117",
|
||||
"comment": "numéro mémorisé",
|
||||
"command": "executeScript",
|
||||
"target": "return ${lesnumeros_resp_asc}.at(${i})",
|
||||
"target": "return ${membres_resp_asc}[${i}].numero",
|
||||
"targets": [],
|
||||
"value": "numero"
|
||||
}, {
|
||||
"id": "9bb92757-6919-4792-b9db-11ecc90bb3a1",
|
||||
"comment": "nom mémorisé",
|
||||
"command": "executeScript",
|
||||
"target": "return ${lesnoms_resp_asc}.at(${i})",
|
||||
"target": "return ${membres_resp_asc}[${i}].nom",
|
||||
"targets": [],
|
||||
"value": "nom"
|
||||
}, {
|
||||
"id": "33f56477-6c3f-4de4-9363-7f843f1cc394",
|
||||
"comment": "responsable mémorisé",
|
||||
"command": "executeScript",
|
||||
"target": "return ${lesresponsables_asc}.at(${i})",
|
||||
"target": "return ${membres_resp_asc}[${i}].resp",
|
||||
"targets": [],
|
||||
"value": "responsable"
|
||||
}, {
|
||||
@ -16242,27 +16018,6 @@
|
||||
"target": "function trierResp(tresp, tnoms, tnumeros, croissant = true) { let tab = []; for (let i = 0; i < tnumeros.length; ++i) { let o = Object(); o.numero = tnumeros[i]; o.nom = tnoms[i]; o.resp = tresp[i]; tab.push(o); } tab.sort((a, b) => { ordre = croissant ? 1 : -1; if (a.resp == '' && b.resp == '') { let comp = a.nom.localeCompare(b.nom); if (comp == 0) { comp = a.numero - b.numero; } return comp * ordre; } if (a.resp == '') { return 1; } if (b.resp == '') { return -1; } let comp = a.resp.localeCompare(b.resp); if (comp == 0) { comp = a.nom.localeCompare(b.nom); } if (comp == 0) { comp = a.numero - b.numero; } return comp * ordre; }); return tab; } return trierResp(${lesresponsables}, ${lesnoms}, ${lesnumeros}, false)",
|
||||
"targets": [],
|
||||
"value": "membres_resp_dec"
|
||||
}, {
|
||||
"id": "8738885b-4a5a-44fd-94bb-07d11fc23220",
|
||||
"comment": "Récupérer les noms",
|
||||
"command": "executeScript",
|
||||
"target": "function extraire(tab){ let resu = []; tab.forEach((e) => { resu.push(e.nom); }); return resu;} return extraire(${membres_resp_dec})",
|
||||
"targets": [],
|
||||
"value": "lesnoms_resp_dec"
|
||||
}, {
|
||||
"id": "6d243324-bdb0-433d-9a7b-0e42f0585598",
|
||||
"comment": "Récupérer les numéros",
|
||||
"command": "executeScript",
|
||||
"target": "function extraire(tab){ let resu = []; tab.forEach((e) => { resu.push(e.numero); }); return resu;} return extraire(${membres_resp_dec})",
|
||||
"targets": [],
|
||||
"value": "lesnumeros_resp_dec"
|
||||
}, {
|
||||
"id": "676fd0c2-7058-435b-897d-401230928130",
|
||||
"comment": "Récupérer les responsables",
|
||||
"command": "executeScript",
|
||||
"target": "function extraire(tab){ let resu = []; tab.forEach((e) => { resu.push(e.resp); }); return resu;} return extraire(${membres_resp_dec})",
|
||||
"targets": [],
|
||||
"value": "lesresponsables_dec"
|
||||
}, {
|
||||
"id": "ac586b0a-21e9-4465-9824-f01a40a51344",
|
||||
"comment": "Afficher le résultat du tri",
|
||||
@ -16561,21 +16316,21 @@
|
||||
"id": "60a159b9-589e-4496-bce6-682a91de513d",
|
||||
"comment": "numéro mémorisé",
|
||||
"command": "executeScript",
|
||||
"target": "return ${lesnumeros_resp_dec}.at(${i})",
|
||||
"target": "return ${membres_resp_dec}[${i}].numero",
|
||||
"targets": [],
|
||||
"value": "numero"
|
||||
}, {
|
||||
"id": "3b0256c8-6389-4a19-9880-c30e272b31c3",
|
||||
"comment": "nom mémorisé",
|
||||
"command": "executeScript",
|
||||
"target": "return ${lesnoms_resp_dec}.at(${i})",
|
||||
"target": "return ${membres_resp_dec}[${i}].nom",
|
||||
"targets": [],
|
||||
"value": "nom"
|
||||
}, {
|
||||
"id": "21a37f0e-766b-4b23-a339-b91e9467833a",
|
||||
"comment": "responsable mémorisé",
|
||||
"command": "executeScript",
|
||||
"target": "return ${lesresponsables_dec}.at(${i})",
|
||||
"target": "return ${membres_resp_dec}[${i}].resp",
|
||||
"targets": [],
|
||||
"value": "responsable"
|
||||
}, {
|
||||
|
Loading…
Reference in New Issue
Block a user