diff --git a/readme.md b/readme.md
index 63a8e99..fb65969 100644
--- a/readme.md
+++ b/readme.md
@@ -1,31 +1,44 @@
## Info
-### Documentation de riot :
+
+### Probleme connu
+```text
+Section : Ingenieur, Ecole de commerce, Tout ce qui commence par "Formation"
+Raison : Le model d'envoie de donnees ne prends pas en charge plus de 3 sections (changer les fonctions getDataN()
```
+
+### IMPORTANT
+```text
+Si ca ne s'affiche pas dans la milli seconde, pas besoin de forcer le boutton,
+faut juste attendre que le MVC receptionne les donnees.
+```
+
+### Documentation de riot :
+```http request
https://riot.js.org/documentation/
```
### Git
-```
+```http request
https://dwarves.iut-fbleau.fr/gitiut/boudjeml/ParcoursupAnalytics
```
## Pour compiler:
### Installer node js
-```
+```http request
https://nodejs.org/en/download/
```
### Run le serveur
-```
+```shell
npm start
```
### Si vous avez des erreurs vous disant qu'un package n'est pas installé,
faites
Structure :
-```
+```shell
npm install {nom_du_package} --save-dev
```
Exemple :
-```
+```shell
npm install webpack --save-dev
```
\ No newline at end of file
diff --git a/src/components/global/api/View.js b/src/components/global/api/View.js
index 3b5fb18..e9afada 100644
--- a/src/components/global/api/View.js
+++ b/src/components/global/api/View.js
@@ -1,11 +1,12 @@
import log from "./log";
+import * as riot from "riot";
export default class View {
constructor() {
this.title = document.getElementById("selector-top-title")
this.zone = document.getElementById("selector-list-zone")
- this.path = document.getElementById("location")
- this.etab = document.getElementById("etab")
+ this.path = document.getElementById("loc")
+ this.etab = document.getElementById("etablanalytics-list")
this.btn = document.getElementById("selector-top-btn")
this.btn.onclick = () => {
this.updateMenu(" ", "previous")
@@ -29,25 +30,18 @@ export default class View {
if(title || data) {
data.forEach((e) => {
- let li = document.createElement("li")
- li.className = "selector-list-inner"
- li.onclick = () => {
+ let elem = document.createElement("selectorfragment")
+ elem.onclick = () => {
this.updateMenu(document.getElementById(`menu0-${e.name}`).innerText, "next")
}
- let name = document.createElement("a")
- name.innerText = e.name
- name.id = `menu0-${e.name}`
- name.className = "selector-list-names"
+ this.zone.appendChild(elem)
- let count = document.createElement("span")
- count.innerText = e.count
- count.className = "selector-list-counts"
-
- li.appendChild(name)
- li.appendChild(count)
-
- this.zone.appendChild(li)
+ riot.mount(elem, {
+ name: e.name,
+ count: e.count,
+ idd: `menu0-${e.name}`
+ }, "selectorfragment")
})
}
@@ -59,7 +53,14 @@ export default class View {
* @param { string[] } path Chemin courant.
* */
renderPath(path) {
- this.path.innerText = `${path[0]} / ${path[1]} / ${path[2]}`
+ this.path.innerHTML = ""
+ let elem = document.createElement("locfragment")
+ this.path.appendChild(elem)
+
+ riot.mount(elem, {
+ msg: path.filter(Boolean).join(" ► ")
+ }, "locfragment")
+
log("Loc->View", `Chemin change ${path}`)
}
@@ -69,13 +70,13 @@ export default class View {
* */
renderEtab(data) {
this.etab.innerHTML =
- "
Nom | Ville | -Dept | +Departement | Moyenne | Selectivite |
---|