added intro

This commit is contained in:
Bachir Soussi Chiadmi
2017-10-18 12:30:38 +02:00
parent 50a22a57dc
commit f45f05be04
12 changed files with 1243 additions and 1083 deletions
+12 -8
View File
@@ -12,7 +12,8 @@ module.exports = {
{
'lc':'lat',
'label':'Latin (Carl Gebhardt)',
'db':'0-LAT-ethicadb.json'},
'db':'0-LAT-ethicadb.json'
},
{
'lc':'fr',
'label':'Français (Traduction par Charles Appuhn)',
@@ -70,6 +71,7 @@ module.exports = {
this.loaded_dbs ++;
//
if (this.loaded_dbs == this.langs.length) {
console.log('All db loaded : data', this.data);
this.parseByID(callback);
}
@@ -79,13 +81,15 @@ module.exports = {
// console.log('l', l);
this.data_byid[l] = {};
for (p in this.data[l]) {
// console.log(this.data[l][p]);
for (e in this.data[l][p].enonces) {
// console.log('e',e);
this.data_byid[l][this.data[l][p].enonces[e].id] = this.data[l][p].enonces[e];
for (c in this.data[l][p].enonces[e].childs){
// console.log(_db[p][e][c]);
this.data_byid[l][this.data[l][p].enonces[e].childs[c].id] = this.data[l][p].enonces[e].childs[c];
if(this.data[l][p].type !== "intro"){
// console.log(this.data[l][p]);
for (e in this.data[l][p].enonces) {
// console.log('e',e);
this.data_byid[l][this.data[l][p].enonces[e].id] = this.data[l][p].enonces[e];
for (c in this.data[l][p].enonces[e].childs){
// console.log(_db[p][e][c]);
this.data_byid[l][this.data[l][p].enonces[e].childs[c].id] = this.data[l][p].enonces[e].childs[c];
}
}
}
}