Index: gc_lang/fr/tb/content/lex_editor.js ================================================================== --- gc_lang/fr/tb/content/lex_editor.js +++ gc_lang/fr/tb/content/lex_editor.js @@ -423,10 +423,11 @@ let sJSON = await oFileHandler.loadFile("fr.personal.json"); this._load(sJSON); }, _load: function (sJSON, bSave=false) { + //console.log("_load"); if (sJSON) { try { let oJSON = JSON.parse(sJSON); this.oIBDAWG = new IBDAWG(oJSON); } @@ -434,11 +435,11 @@ this.setDictData(0, "#Erreur. Voir la console."); console.error(e); return; } if (bSave) { - oFileHandler.saveFile("fr.personal.json", JSON.stringify(oJSON)); + oFileHandler.saveFile("fr.personal.json", sJSON); } let lEntry = []; for (let aRes of this.oIBDAWG.select()) { lEntry.push(aRes); } @@ -450,14 +451,16 @@ disableElement("export_button"); } }, import: function () { + //console.log("import"); oFileHandler.loadAs(this._import.bind(this)); }, _import: function (sJSON) { + //console.log("_import"); this._load(sJSON, true); }, setDictData: function (nEntries, sDate) { document.getElementById("dic_num_entries").value = nEntries;