Overview
Comment: | [fx] dictionaries creation: update |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | fx | comdic |
Files: | files | file ages | folders |
SHA3-256: |
e422d67a989574ed6f8a9410d2011397 |
User & Date: | olr on 2019-02-04 18:42:32 |
Other Links: | branch diff | manifest | tags |
Context
2019-02-05
| ||
12:24 | [fx] remember dictionaries selection check-in: 0ee518126e user: olr tags: fx, comdic | |
2019-02-04
| ||
18:42 | [fx] dictionaries creation: update check-in: e422d67a98 user: olr tags: fx, comdic | |
2019-02-02
| ||
17:17 | [fx] shortcuts documentation check-in: d57413d421 user: olr tags: fx, comdic | |
Changes
Modified gc_lang/fr/webext/panel/dictionaries.js from [cb7ebf796e] to [a23a514018].
︙ | |||
176 177 178 179 180 181 182 | 176 177 178 179 180 181 182 183 184 185 186 187 188 189 | - | let xRowNode = createNode("tr", { id: this.sNodeId + "_row_" + this.iEntryIndex }); if (this.bDeleteButtons) { xRowNode.appendChild(createNode("td", { textContent: "×", className: "delete_entry", title: "Effacer cette entrée" }, { id_entry: this.iEntryIndex })); } let [nDicId, sName, sOwner, nEntry, sDescription, ...data] = lData; xRowNode.appendChild(createNode("td", { textContent: nDicId })); xRowNode.appendChild(createNode("td", { textContent: sName })); |
︙ | |||
281 282 283 284 285 286 287 288 289 290 291 292 293 | 280 281 282 283 284 285 286 287 288 289 290 291 292 293 | + | let lDict = []; for (let sName of this.dSelectedDict.keys()) { lDict.push(this.dDict.get(sName)); } let oDict = dic_merger.merge(lDict, "S", "fr", "Français", "fr.community", "Dictionnaire communautaire (personnalisé)", this.xProgressBar); console.log(oDict); browser.storage.local.set({ "community_dictionary": oDict }); browser.storage.local.set({ "selected_dictionaries_list": this.dSelectedDict.keys() }); } } const oDicTable = new Table("dictionaries_table", ["Id", "Nom", "par", "Entrées", "Description"], "wait_progress", "num_dic", false, true); oDicTable.getDictionarieslist(); |
Modified gc_lang/fr/webext/panel/lex_editor.css from [1abb09b463] to [0f7a2051f7].
︙ | |||
342 343 344 345 346 347 348 349 350 351 352 353 354 355 | 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 | + | border-radius: 3px; } #create_dictionary_button { padding: 1px 5px; background-color: hsl(120, 50%, 30%); color: hsl(120, 10%, 100%); border-radius: 3px; cursor: pointer; } #wait_progress { width: 100%; height: 4px; } |
︙ |
Modified gc_lang/fr/webext/panel/lex_editor.html from [2d922cc2ca] to [8e3bc0ab95].
︙ | |||
30 31 32 33 34 35 36 | 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | - + | <label id="import_button" for="import_input">Importer</label> </div> <div id="export_button">Exporter</div> </div> <div id="new_dictionary_section" style="display: none;"> <div class="dic_container"> <div>Nouveau dictionnaire partagé</div> |
︙ |
Modified gc_lang/fr/webext/panel/lex_editor.js from [954238d6d4] to [09cfed190d].
︙ | |||
15 16 17 18 19 20 21 | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | - + | Common functions */ function showError (e) { console.error(e.fileName + "\n" + e.name + "\nline: " + e.lineNumber + "\n" + e.message); } |
︙ | |||
502 503 504 505 506 507 508 | 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 | - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | catch (e) { showError(e); } } } const oDictHandler = { |
︙ | |||
571 572 573 574 575 576 577 578 579 580 581 582 583 584 | 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 | + + + + + + + + + + + + + | this.parseDict(oJSON); } else { oLexiconTable.clear(); this.setDictData(0, "[néant]"); hideElement("save_button"); } }, newDictionary: function () { this.oIBDAWG = null; this.sName = document.getElementById("new_dictionary_name").value; this.sDescription = document.getElementById("new_dictionary_description").value; oDictHandler.addDictionary(this.sName); oLexiconTable.clear(); this.setDictData(0, "[néant]"); hideElement("save_button"); document.getElementById("new_dictionary_name").value = ""; document.getElementById("new_dictionary_description").value = ""; hideElement("new_dictionary_section") }, parseDict: function (oJSON) { try { this.oIBDAWG = new IBDAWG(oJSON); } catch (e) { console.error(e); |
︙ | |||
628 629 630 631 632 633 634 | 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 | - + + | 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); document.getElementById("new_dictionary_button").addEventListener("click", () => { switchDisplay("new_dictionary_section"); }, false); |
︙ | |||
650 651 652 653 654 655 656 | 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 | - - + - - | } hideElement("save_button"); }, delete: function () { if (confirm("Voulez-vous effacer le dictionnaire “"+this.sName+"” ?")) { oLexiconTable.clear(); |
︙ |