added lat and en languages, handeled new data structure : titles and filet
This commit is contained in:
@@ -9,8 +9,10 @@
|
||||
module.exports = {
|
||||
lang:'fr',
|
||||
langs:[
|
||||
{'lc':'lat', 'label':'lat', 'db':'0-LAT-ethicadb.json'},
|
||||
{'lc':'fr', 'label':'fr', 'db':'2-Appuhn-FR-ethicadb.json'},
|
||||
{'lc':'bra', 'label':'bra', 'db':'ethica-bresilen.json'}
|
||||
{'lc':'bra', 'label':'bra', 'db':'ethica-bresilen.json'},
|
||||
{'lc':'en', 'label':'en', 'db':'3-Elwes-EN-ethicadb.json'}
|
||||
],
|
||||
data:[],
|
||||
loaded_dbs:0,
|
||||
@@ -48,7 +50,7 @@ module.exports = {
|
||||
xobj.send(null);
|
||||
},
|
||||
onJSONLoaded: function(lc, json, callback){
|
||||
console.log('onDBLoaded');
|
||||
console.log('onDBLoaded '+lc);
|
||||
this.data[lc] = JSON.parse(json);
|
||||
this.loaded_dbs ++;
|
||||
//
|
||||
@@ -82,6 +84,9 @@ module.exports = {
|
||||
for (id in this.data_byid[this.langs[0].lc]) {
|
||||
item = this.data_byid[this.langs[0].lc][id];
|
||||
// console.log(item);
|
||||
// skeep titles as they don't have structure data
|
||||
if(item.type == "title") continue;
|
||||
|
||||
obj = {
|
||||
'to':[],
|
||||
'from':[],
|
||||
|
||||
Reference in New Issue
Block a user