diff --git a/components/main-controller.riot b/components/main-controller.riot
index ce8afd7..031a5c0 100644
--- a/components/main-controller.riot
+++ b/components/main-controller.riot
@@ -80,13 +80,11 @@
school: school,
popupEnabled: true
})
- console.log("popup!")
},
closePopup(){
this.update({
popupEnabled: false
})
- console.log("closed!")
}
}
diff --git a/components/school-info.riot b/components/school-info.riot
index e829578..93fdfd6 100644
--- a/components/school-info.riot
+++ b/components/school-info.riot
@@ -22,9 +22,9 @@
diff --git a/components/school.riot b/components/school.riot
index 8479e87..87440b6 100644
--- a/components/school.riot
+++ b/components/school.riot
@@ -110,8 +110,9 @@
L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 19,
attribution: '©
OpenStreetMap'
- }).addTo(state.map);
- } else (state.map) {
+ }).addTo(state.map)
+
+ } else if (props.shouldShowInfos) {
state.markers.clearLayers()
for (let school of state.filteredSchoolList) {
let fields = school.fields
diff --git a/javascript/fili-info.js b/javascript/fili-info.js
index ac90502..8d17288 100644
--- a/javascript/fili-info.js
+++ b/javascript/fili-info.js
@@ -81,54 +81,54 @@ var filiInfo = {
this.updateFiliStats();
}
},
- template: (template, expressionTypes, bindingTypes, getComponent) => template('
', [{
+ template: (template, expressionTypes, bindingTypes, getComponent) => template('
', [{
type: bindingTypes.IF,
evaluate: _scope => _scope.props.shouldShowInfos,
- redundantAttribute: 'expr2138',
- selector: '[expr2138]',
- template: template('
/ \n / \n
Moyenne des admis
Nombre de formations
Capacité
', [{
- redundantAttribute: 'expr2139',
- selector: '[expr2139]',
+ redundantAttribute: 'expr0',
+ selector: '[expr0]',
+ template: template('
/ \r\n / \r\n
Moyenne des admis
Nombre de formations
Capacité
', [{
+ redundantAttribute: 'expr1',
+ selector: '[expr1]',
expressions: [{
type: expressionTypes.TEXT,
childNodeIndex: 0,
evaluate: _scope => _scope.props.course.fili
}]
}, {
- redundantAttribute: 'expr2140',
- selector: '[expr2140]',
+ redundantAttribute: 'expr2',
+ selector: '[expr2]',
expressions: [{
type: expressionTypes.TEXT,
childNodeIndex: 0,
evaluate: _scope => _scope.props.course.sousfili
}]
}, {
- redundantAttribute: 'expr2141',
- selector: '[expr2141]',
+ redundantAttribute: 'expr3',
+ selector: '[expr3]',
expressions: [{
type: expressionTypes.TEXT,
childNodeIndex: 0,
evaluate: _scope => _scope.props.course.soussousfili
}]
}, {
- redundantAttribute: 'expr2142',
- selector: '[expr2142]',
+ redundantAttribute: 'expr4',
+ selector: '[expr4]',
expressions: [{
type: expressionTypes.TEXT,
childNodeIndex: 0,
evaluate: _scope => _scope.state.average
}]
}, {
- redundantAttribute: 'expr2143',
- selector: '[expr2143]',
+ redundantAttribute: 'expr5',
+ selector: '[expr5]',
expressions: [{
type: expressionTypes.TEXT,
childNodeIndex: 0,
evaluate: _scope => _scope.state.courseNumber
}]
}, {
- redundantAttribute: 'expr2144',
- selector: '[expr2144]',
+ redundantAttribute: 'expr6',
+ selector: '[expr6]',
expressions: [{
type: expressionTypes.TEXT,
childNodeIndex: 0,
@@ -148,8 +148,8 @@ var filiInfo = {
name: 'value',
evaluate: _scope => _scope.state.selectivity
}],
- redundantAttribute: 'expr2145',
- selector: '[expr2145]'
+ redundantAttribute: 'expr7',
+ selector: '[expr7]'
}, {
type: bindingTypes.TAG,
getComponent: getComponent,
@@ -160,8 +160,8 @@ var filiInfo = {
name: 'data',
evaluate: _scope => _scope.state.genreStats
}],
- redundantAttribute: 'expr2146',
- selector: '[expr2146]'
+ redundantAttribute: 'expr8',
+ selector: '[expr8]'
}, {
type: bindingTypes.TAG,
getComponent: getComponent,
@@ -172,8 +172,8 @@ var filiInfo = {
name: 'data',
evaluate: _scope => _scope.state.bacStats
}],
- redundantAttribute: 'expr2147',
- selector: '[expr2147]'
+ redundantAttribute: 'expr9',
+ selector: '[expr9]'
}, {
type: bindingTypes.TAG,
getComponent: getComponent,
@@ -184,8 +184,8 @@ var filiInfo = {
name: 'data',
evaluate: _scope => _scope.state.mentionStats
}],
- redundantAttribute: 'expr2148',
- selector: '[expr2148]'
+ redundantAttribute: 'expr10',
+ selector: '[expr10]'
}])
}]),
name: 'fili-info'
diff --git a/javascript/main-controller.js b/javascript/main-controller.js
index de9c711..9064d68 100644
--- a/javascript/main-controller.js
+++ b/javascript/main-controller.js
@@ -102,16 +102,14 @@ var mainController = {
school: school,
popupEnabled: true
});
- console.log("popup!");
},
closePopup() {
this.update({
popupEnabled: false
});
- console.log("closed!");
}
},
- template: (template, expressionTypes, bindingTypes, getComponent) => template('
', [{
+ template: (template, expressionTypes, bindingTypes, getComponent) => template('
', [{
type: bindingTypes.TAG,
getComponent: getComponent,
evaluate: _scope => 'search',
@@ -121,11 +119,11 @@ var mainController = {
name: 'updateCourse',
evaluate: _scope => _scope.updateCourse
}],
- redundantAttribute: 'expr2165',
- selector: '[expr2165]'
+ redundantAttribute: 'expr40',
+ selector: '[expr40]'
}, {
- redundantAttribute: 'expr2166',
- selector: '[expr2166]',
+ redundantAttribute: 'expr41',
+ selector: '[expr41]',
expressions: [{
type: expressionTypes.EVENT,
name: 'onclick',
@@ -149,8 +147,8 @@ var mainController = {
name: 'shouldShowInfos',
evaluate: _scope => _scope.state.shouldShowInfos
}],
- redundantAttribute: 'expr2167',
- selector: '[expr2167]'
+ redundantAttribute: 'expr42',
+ selector: '[expr42]'
}, {
type: bindingTypes.TAG,
getComponent: getComponent,
@@ -177,8 +175,8 @@ var mainController = {
name: 'shouldShowInfos',
evaluate: _scope => _scope.state.shouldShowInfos
}],
- redundantAttribute: 'expr2168',
- selector: '[expr2168]'
+ redundantAttribute: 'expr43',
+ selector: '[expr43]'
}, {
type: bindingTypes.TAG,
getComponent: getComponent,
@@ -197,8 +195,8 @@ var mainController = {
name: 'school',
evaluate: _scope => _scope.state.school
}],
- redundantAttribute: 'expr2169',
- selector: '[expr2169]'
+ redundantAttribute: 'expr44',
+ selector: '[expr44]'
}]),
name: 'main-controller'
};
diff --git a/javascript/school-info.js b/javascript/school-info.js
index 752d735..af21698 100644
--- a/javascript/school-info.js
+++ b/javascript/school-info.js
@@ -64,62 +64,62 @@ var schoolInfo = {
}];
}
},
- template: (template, expressionTypes, bindingTypes, getComponent) => template('
', [{
+ template: (template, expressionTypes, bindingTypes, getComponent) => template('
', [{
type: bindingTypes.IF,
evaluate: _scope => _scope.props.popupEnabled,
- redundantAttribute: 'expr2149',
- selector: '[expr2149]',
- template: template('
', [{
- redundantAttribute: 'expr2150',
- selector: '[expr2150]',
+ redundantAttribute: 'expr77',
+ selector: '[expr77]',
+ template: template('
', [{
+ redundantAttribute: 'expr78',
+ selector: '[expr78]',
expressions: [{
type: expressionTypes.TEXT,
childNodeIndex: 0,
evaluate: _scope => _scope.props.school.fields.g_ea_lib_vx
}]
}, {
- redundantAttribute: 'expr2151',
- selector: '[expr2151]',
+ redundantAttribute: 'expr79',
+ selector: '[expr79]',
expressions: [{
type: expressionTypes.TEXT,
childNodeIndex: 0,
evaluate: _scope => ['Ville : ', _scope.props.school.fields.ville_etab].join('')
}]
}, {
- redundantAttribute: 'expr2152',
- selector: '[expr2152]',
+ redundantAttribute: 'expr80',
+ selector: '[expr80]',
expressions: [{
type: expressionTypes.TEXT,
childNodeIndex: 0,
evaluate: _scope => ['Département : ', _scope.props.school.fields.dep, ' ', _scope.props.school.fields.dep_lib].join('')
}]
}, {
- redundantAttribute: 'expr2153',
- selector: '[expr2153]',
+ redundantAttribute: 'expr81',
+ selector: '[expr81]',
expressions: [{
type: expressionTypes.TEXT,
childNodeIndex: 0,
evaluate: _scope => ['Académie : ', _scope.props.school.fields.acad_mies].join('')
}]
}, {
- redundantAttribute: 'expr2154',
- selector: '[expr2154]',
+ redundantAttribute: 'expr82',
+ selector: '[expr82]',
expressions: [{
type: expressionTypes.TEXT,
childNodeIndex: 0,
evaluate: _scope => _scope.props.school.fields.contrat_etab
}]
}, {
- redundantAttribute: 'expr2155',
- selector: '[expr2155]',
+ redundantAttribute: 'expr83',
+ selector: '[expr83]',
expressions: [{
type: expressionTypes.TEXT,
childNodeIndex: 0,
evaluate: _scope => ['Capacité : ', _scope.props.school.fields.capa_fin].join('')
}]
}, {
- redundantAttribute: 'expr2156',
- selector: '[expr2156]',
+ redundantAttribute: 'expr84',
+ selector: '[expr84]',
expressions: [{
type: expressionTypes.TEXT,
childNodeIndex: 0,
@@ -128,8 +128,8 @@ var schoolInfo = {
}, {
type: bindingTypes.IF,
evaluate: _scope => _scope.props.school.fields.lib_grp1,
- redundantAttribute: 'expr2157',
- selector: '[expr2157]',
+ redundantAttribute: 'expr85',
+ selector: '[expr85]',
template: template(' ', [{
expressions: [{
type: expressionTypes.TEXT,
@@ -140,8 +140,8 @@ var schoolInfo = {
}, {
type: bindingTypes.IF,
evaluate: _scope => _scope.props.school.fields.lib_grp2,
- redundantAttribute: 'expr2158',
- selector: '[expr2158]',
+ redundantAttribute: 'expr86',
+ selector: '[expr86]',
template: template(' ', [{
expressions: [{
type: expressionTypes.TEXT,
@@ -152,8 +152,8 @@ var schoolInfo = {
}, {
type: bindingTypes.IF,
evaluate: _scope => _scope.props.school.fields.lib_grp3,
- redundantAttribute: 'expr2159',
- selector: '[expr2159]',
+ redundantAttribute: 'expr87',
+ selector: '[expr87]',
template: template(' ', [{
expressions: [{
type: expressionTypes.TEXT,
@@ -162,8 +162,8 @@ var schoolInfo = {
}]
}])
}, {
- redundantAttribute: 'expr2160',
- selector: '[expr2160]',
+ redundantAttribute: 'expr88',
+ selector: '[expr88]',
expressions: [{
type: expressionTypes.TEXT,
childNodeIndex: 0,
@@ -179,8 +179,8 @@ var schoolInfo = {
name: 'data',
evaluate: _scope => _scope.state.genreStats
}],
- redundantAttribute: 'expr2161',
- selector: '[expr2161]'
+ redundantAttribute: 'expr89',
+ selector: '[expr89]'
}, {
type: bindingTypes.TAG,
getComponent: getComponent,
@@ -191,8 +191,8 @@ var schoolInfo = {
name: 'data',
evaluate: _scope => _scope.state.bacStats
}],
- redundantAttribute: 'expr2162',
- selector: '[expr2162]'
+ redundantAttribute: 'expr90',
+ selector: '[expr90]'
}, {
type: bindingTypes.TAG,
getComponent: getComponent,
@@ -203,11 +203,11 @@ var schoolInfo = {
name: 'data',
evaluate: _scope => _scope.state.mentionStats
}],
- redundantAttribute: 'expr2163',
- selector: '[expr2163]'
+ redundantAttribute: 'expr91',
+ selector: '[expr91]'
}, {
- redundantAttribute: 'expr2164',
- selector: '[expr2164]',
+ redundantAttribute: 'expr92',
+ selector: '[expr92]',
expressions: [{
type: expressionTypes.EVENT,
name: 'onclick',
diff --git a/javascript/school.js b/javascript/school.js
index 3bb5c59..afeb617 100644
--- a/javascript/school.js
+++ b/javascript/school.js
@@ -69,7 +69,16 @@ var school = {
state.filteredSchoolList = [...state.schoolList];
if (this.$("input")) this.$("input").value = "";
}
- if (state.map) {
+ },
+ onUpdated(props, state) {
+ if (!state.map && props.shouldShowInfos) {
+ state.map = L.map("map").setView([47, 2.5], 5);
+ state.markers = L.markerClusterGroup();
+ L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
+ maxZoom: 19,
+ attribution: '©
OpenStreetMap'
+ }).addTo(state.map);
+ } else if (props.shouldShowInfos) {
state.markers.clearLayers();
for (let school of state.filteredSchoolList) {
let fields = school.fields;
@@ -78,7 +87,6 @@ var school = {
let title = document.createElement("span");
title.textContent = fields.g_ea_lib_vx;
title.class = "is-primary";
- console.log(props);
let linkToForma = document.createElement("a");
linkToForma.onclick = () => props.popup(school);
linkToForma.textContent = "Voir les infos de l'établissement";
@@ -92,16 +100,6 @@ var school = {
state.map.addLayer(state.markers);
}
},
- onUpdated(props, state) {
- if (!state.map && props.shouldShowInfos) {
- state.map = L.map("map").setView([47, 2.5], 5);
- state.markers = L.markerClusterGroup();
- L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
- maxZoom: 19,
- attribution: '©
OpenStreetMap'
- }).addTo(state.map);
- }
- },
onBeforeMount(props, state) {
this.state = {
sortBy: null,
@@ -111,14 +109,14 @@ var school = {
},
sortFields: SORT_TABLE
},
- template: (template, expressionTypes, bindingTypes, getComponent) => template('
', [{
+ template: (template, expressionTypes, bindingTypes, getComponent) => template('
', [{
type: bindingTypes.IF,
evaluate: _scope => _scope.props.shouldShowInfos,
- redundantAttribute: 'expr157',
- selector: '[expr157]',
- template: template('
', [{
- redundantAttribute: 'expr158',
- selector: '[expr158]',
+ redundantAttribute: 'expr51',
+ selector: '[expr51]',
+ template: template('
', [{
+ redundantAttribute: 'expr52',
+ selector: '[expr52]',
expressions: [{
type: expressionTypes.EVENT,
name: 'onkeyup',
@@ -128,15 +126,15 @@ var school = {
type: bindingTypes.EACH,
getKey: null,
condition: null,
- template: template('
', [{
+ template: template('
', [{
expressions: [{
type: expressionTypes.TEXT,
childNodeIndex: 0,
evaluate: _scope => [_scope.sortField.name].join('')
}]
}, {
- redundantAttribute: 'expr160',
- selector: '[expr160]',
+ redundantAttribute: 'expr54',
+ selector: '[expr54]',
expressions: [{
type: expressionTypes.ATTRIBUTE,
name: 'id',
@@ -147,8 +145,8 @@ var school = {
evaluate: _scope => () => _scope.sortList(_scope.sortField.id, true)
}]
}]),
- redundantAttribute: 'expr159',
- selector: '[expr159]',
+ redundantAttribute: 'expr53',
+ selector: '[expr53]',
itemName: 'sortField',
indexName: null,
evaluate: _scope => _scope.sortFields
@@ -156,9 +154,9 @@ var school = {
type: bindingTypes.EACH,
getKey: null,
condition: null,
- template: template('
| | | | | ', [{
- redundantAttribute: 'expr162',
- selector: '[expr162]',
+ template: template('
| | | | | ', [{
+ redundantAttribute: 'expr56',
+ selector: '[expr56]',
expressions: [{
type: expressionTypes.TEXT,
childNodeIndex: 0,
@@ -169,24 +167,24 @@ var school = {
evaluate: _scope => () => _scope.props.popup(_scope.school)
}]
}, {
- redundantAttribute: 'expr163',
- selector: '[expr163]',
+ redundantAttribute: 'expr57',
+ selector: '[expr57]',
expressions: [{
type: expressionTypes.TEXT,
childNodeIndex: 0,
evaluate: _scope => _scope.school.fields.ville_etab
}]
}, {
- redundantAttribute: 'expr164',
- selector: '[expr164]',
+ redundantAttribute: 'expr58',
+ selector: '[expr58]',
expressions: [{
type: expressionTypes.TEXT,
childNodeIndex: 0,
evaluate: _scope => _scope.school.fields.dep
}]
}, {
- redundantAttribute: 'expr165',
- selector: '[expr165]',
+ redundantAttribute: 'expr59',
+ selector: '[expr59]',
expressions: [{
type: expressionTypes.TEXT,
childNodeIndex: 0,
@@ -202,11 +200,11 @@ var school = {
name: 'value',
evaluate: _scope => _scope.school.fields.taux_acces_ens
}],
- redundantAttribute: 'expr166',
- selector: '[expr166]'
+ redundantAttribute: 'expr60',
+ selector: '[expr60]'
}]),
- redundantAttribute: 'expr161',
- selector: '[expr161]',
+ redundantAttribute: 'expr55',
+ selector: '[expr55]',
itemName: 'school',
indexName: null,
evaluate: _scope => _scope.state.filteredSchoolList
diff --git a/javascript/search.js b/javascript/search.js
index cbad187..a4fdad8 100644
--- a/javascript/search.js
+++ b/javascript/search.js
@@ -150,9 +150,9 @@ var search = {
this.updateList();
}
},
- template: (template, expressionTypes, bindingTypes, getComponent) => template('
', [{
- redundantAttribute: 'expr28',
- selector: '[expr28]',
+ template: (template, expressionTypes, bindingTypes, getComponent) => template('
', [{
+ redundantAttribute: 'expr45',
+ selector: '[expr45]',
expressions: [{
type: expressionTypes.EVENT,
name: 'onkeyup',
@@ -163,8 +163,8 @@ var search = {
evaluate: _scope => _scope.state.placeholder
}]
}, {
- redundantAttribute: 'expr29',
- selector: '[expr29]',
+ redundantAttribute: 'expr46',
+ selector: '[expr46]',
expressions: [{
type: expressionTypes.ATTRIBUTE,
name: 'disabled',
@@ -178,9 +178,9 @@ var search = {
type: bindingTypes.EACH,
getKey: null,
condition: null,
- template: template('
', [{
- redundantAttribute: 'expr31',
- selector: '[expr31]',
+ template: template('
', [{
+ redundantAttribute: 'expr48',
+ selector: '[expr48]',
expressions: [{
type: expressionTypes.ATTRIBUTE,
name: 'disabled',
@@ -191,24 +191,24 @@ var search = {
evaluate: _scope => () => _scope.cruiseForward(_scope.item.name)
}]
}, {
- redundantAttribute: 'expr32',
- selector: '[expr32]',
+ redundantAttribute: 'expr49',
+ selector: '[expr49]',
expressions: [{
type: expressionTypes.TEXT,
childNodeIndex: 0,
evaluate: _scope => _scope.item.name
}]
}, {
- redundantAttribute: 'expr33',
- selector: '[expr33]',
+ redundantAttribute: 'expr50',
+ selector: '[expr50]',
expressions: [{
type: expressionTypes.TEXT,
childNodeIndex: 0,
evaluate: _scope => _scope.item.count
}]
}]),
- redundantAttribute: 'expr30',
- selector: '[expr30]',
+ redundantAttribute: 'expr47',
+ selector: '[expr47]',
itemName: 'item',
indexName: null,
evaluate: _scope => _scope.state.items
diff --git a/javascript/title-progress.js b/javascript/title-progress.js
index c7c1f3a..49efb9e 100644
--- a/javascript/title-progress.js
+++ b/javascript/title-progress.js
@@ -1,5 +1,5 @@
const DEFAULT_CLASSES = "progress is-small m-2 mt-auto mb-auto";
-const COLOR_CLASSES = ["is-danger", "is-warning", "is-success", "is-info", "is-link"];
+const COLOR_CLASSES = ["is-link", "is-info", "is-success", "is-warning", "is-danger"];
var titleProgress = {
css: null,
exports: {
@@ -25,11 +25,11 @@ var titleProgress = {
state.class = this.computeClasses();
}
},
- template: (template, expressionTypes, bindingTypes, getComponent) => template('
', [{
+ template: (template, expressionTypes, bindingTypes, getComponent) => template('
', [{
type: bindingTypes.IF,
evaluate: _scope => _scope.props.title,
- redundantAttribute: 'expr44',
- selector: '[expr44]',
+ redundantAttribute: 'expr11',
+ selector: '[expr11]',
template: template(' ', [{
expressions: [{
type: expressionTypes.TEXT,
@@ -38,16 +38,16 @@ var titleProgress = {
}]
}])
}, {
- redundantAttribute: 'expr45',
- selector: '[expr45]',
+ redundantAttribute: 'expr12',
+ selector: '[expr12]',
expressions: [{
type: expressionTypes.TEXT,
childNodeIndex: 0,
evaluate: _scope => _scope.calcPct()
}]
}, {
- redundantAttribute: 'expr46',
- selector: '[expr46]',
+ redundantAttribute: 'expr13',
+ selector: '[expr13]',
expressions: [{
type: expressionTypes.ATTRIBUTE,
name: 'value',