started to use ES6 coding standard
This commit is contained in:
@@ -34,13 +34,13 @@ module.exports = {
|
||||
loaded_dbs:0,
|
||||
data_byid:[],
|
||||
data_strct:{},
|
||||
load: function(callback) {
|
||||
load(callback) {
|
||||
// load all dbs, when all loaded call main app callback function
|
||||
for (var i = 0; i < this.langs.length; i++) {
|
||||
this.loadJSON(this.langs[i].lc, '/assets/jsondb/'+this.langs[i].db, callback)
|
||||
}
|
||||
},
|
||||
loadJSON: function(lc, file, callback){
|
||||
loadJSON(lc, file, callback){
|
||||
|
||||
var xobj = new XMLHttpRequest();
|
||||
xobj.overrideMimeType("application/json");
|
||||
@@ -65,7 +65,7 @@ module.exports = {
|
||||
xobj.open('GET', file, true);
|
||||
xobj.send(null);
|
||||
},
|
||||
onJSONLoaded: function(lc, json, callback){
|
||||
onJSONLoaded(lc, json, callback){
|
||||
console.log('onDBLoaded '+lc);
|
||||
this.data[lc] = JSON.parse(json);
|
||||
this.loaded_dbs ++;
|
||||
@@ -76,7 +76,7 @@ module.exports = {
|
||||
}
|
||||
|
||||
},
|
||||
parseByID: function(callback){
|
||||
parseByID(callback){
|
||||
for(l in this.data){
|
||||
// console.log('l', l);
|
||||
this.data_byid[l] = {};
|
||||
@@ -97,7 +97,7 @@ module.exports = {
|
||||
// console.log('this.data_byid', this.data_byid);
|
||||
this.parseStrct(callback);
|
||||
},
|
||||
parseStrct: function(callback){
|
||||
parseStrct(callback){
|
||||
|
||||
var id, item, obj, links_match, link, tid;
|
||||
for (id in this.data_byid[this.langs[0].lc]) {
|
||||
|
||||
Reference in New Issue
Block a user