Overview
| Comment: | [fx] fix lexicon editor |
|---|---|
| Downloads: | Tarball | ZIP archive | SQL archive |
| Timelines: | family | ancestors | descendants | both | trunk | fx |
| Files: | files | file ages | folders |
| SHA3-256: |
468fa05728e2f41233fdfd5fe439bd40 |
| User & Date: | olr on 2019-04-03 16:01:31 |
| Other Links: | manifest | tags |
Context
|
2019-04-03
| ||
| 20:04 | [fr] phonet_simil: quota/cota check-in: 8fced24da3 user: olr tags: trunk, fr | |
| 16:01 | [fx] fix lexicon editor check-in: 468fa05728 user: olr tags: trunk, fx | |
| 15:02 | [fx] add a lexicon editor entry to the menu check-in: fbf4f3afee user: olr tags: trunk, fx | |
Changes
Modified gc_lang/fr/webext/panel/lex_editor.js from [b98659c88b] to [b73a329e9e].
| ︙ | |||
533 534 535 536 537 538 539 | 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 | - + |
_loadDictionaries: function (oResult) {
if (oResult.hasOwnProperty("shared_dictionaries")) {
this.oDictionaries = oResult.shared_dictionaries;
}
if (oResult.hasOwnProperty("personal_dictionary")) {
this.oPersonalDictionary = oResult.personal_dictionary;
|
| ︙ | |||
584 585 586 587 588 589 590 591 592 593 594 595 596 597 | 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 | + + + + |
//console.log(this.oDictionaries[sName]);
return this.oDictionaries[sName];
}
return null;
},
saveDictionary: function (sName, oJSON) {
if (!sName) {
console.log("Error: name of dictionary to save is empty.")
return;
}
if (sName == "__personal__") {
browser.runtime.sendMessage({ sCommand: "setDictionary", dParam: {sDictionary: "personal", oDict: oJSON}, dInfo: {} });
browser.storage.local.set({ "personal_dictionary": oJSON });
}
else {
this.oDictionaries[sName] = oJSON;
if (oJSON === null) {
|
| ︙ | |||
653 654 655 656 657 658 659 | 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 | - + |
const oBinaryDict = {
oIBDAWG: null,
sName: "",
sDescription: "",
|
| ︙ | |||
734 735 736 737 738 739 740 | 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 | - + |
},
listen: function () {
document.getElementById("dic_selector").addEventListener("change", () => {this.load(document.getElementById("dic_selector").value)}, false);
document.getElementById("save_button").addEventListener("click", () => { this.build(); }, false);
document.getElementById("export_button").addEventListener("click", () => { this.export(); }, false);
document.getElementById("import_input").addEventListener("change", () => { this.import(); }, false);
|
| ︙ |