Overview
Comment: | [tb] lexicon editor: update |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | tb | multid |
Files: | files | file ages | folders |
SHA3-256: |
d61338b1a89050b16403dd90dd48cd05 |
User & Date: | olr on 2018-03-18 17:27:35 |
Other Links: | branch diff | manifest | tags |
Context
2018-03-19
| ||
12:37 | [tb] store personal dictionary in file instead of preferences.js: create a file handler to simplify the mess check-in: 2d0855bb95 user: olr tags: tb, multid | |
2018-03-18
| ||
17:27 | [tb] lexicon editor: update check-in: d61338b1a8 user: olr tags: tb, multid | |
2018-03-17
| ||
16:51 | [tb] lexicon editor: useless import check-in: ebf940de4a user: olr tags: tb, multid | |
Changes
Modified gc_lang/fr/tb/content/lex_editor.css from [acf1557d56] to [2ca5e4943b].
1 2 3 4 5 6 7 8 9 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | - - - - + - - - - - - - - - | /* CSS */ /* Dictionary */ .dictionary { font-size: 18px; font-weight: bold; color: hsl(210, 50%, 50%); |
︙ | |||
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 | 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | + + + + + | } #generated_words_table { width: 400px; height: 600px; } .delete_entry { color: hsl(0, 100%, 50%); font-weight: bold; } /* Lexicon tab */ #lexicon_table { width: 600px; height: 650px; } .info_label { width: 120px; } .data { width: 90px; } |
Modified gc_lang/fr/tb/content/lex_editor.js from [89f16a45e4] to [4b52ef9dfc].
︙ | |||
63 64 65 66 67 68 69 | 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 | - - | this.nEntry = 0 this._createHeader(); this.listen(); } _createHeader () { let xListheadNode = createNode("listhead"); |
︙ | |||
111 112 113 114 115 116 117 | 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 | - + - + - - + - + + | } this.nEntry += lFlex.length; this.showEntryNumber(); } showEntryNumber () { if (this.xNumEntry) { |
︙ | |||
447 448 449 450 451 452 453 454 455 456 457 458 459 460 | 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 | + + | let lEntry = []; for (let s of this.oIBDAWG.select()) { lEntry.push(s.split("\t")); } oLexiconTable.fill(lEntry); this.setDictData(this.oIBDAWG.nEntry, this.oIBDAWG.sDate); enableElement("export_button"); } else { disableElement("export_button"); } }, setDictData: function (nEntries, sDate) { document.getElementById("dic_num_entries").value = nEntries; document.getElementById("dic_save_date").value = sDate; }, |
︙ | |||
471 472 473 474 475 476 477 | 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 | + - - + + + + + | if (lEntry.length > 0) { let oDAWG = new DAWG(lEntry, "S", "fr", "Français", "Dictionnaire personnel", xProgressNode); let oJSON = oDAWG.createBinaryJSON(1); prefs.setCharPref("oPersonalDictionary", JSON.stringify(oJSON)); this.oIBDAWG = new IBDAWG(oJSON); this.setDictData(this.oIBDAWG.nEntry, this.oIBDAWG.sDate); //browser.runtime.sendMessage({ sCommand: "setDictionary", dParam: {sType: "personal", oDict: oJSON}, dInfo: {} }); enableElement("export_button"); |
︙ | |||
512 513 514 515 516 517 518 | 516 517 518 519 520 521 522 523 524 525 526 527 528 | - - + + | } }); } } |
Modified gc_lang/fr/tb/content/lex_editor.xul from [9a4f4b9ece] to [121a38c9de].
︙ | |||
14 15 16 17 18 19 20 | 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | + - - - - + + + + + + | width="500" onload="document.getElementById('grammalecte-lexicon-editor-window').centerWindowOnScreen();" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <!-- Other elements go here --> <hbox> <label class="dictionary" value="Dictionnaire personnel" /> <spacer flex="1" /> |
︙ |