Overview
Comment: | [fx] page for dictionaries (draft) |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | fx | comdic |
Files: | files | file ages | folders |
SHA3-256: |
09a2b4f200a77af193eea72cc61e6a38 |
User & Date: | olr on 2018-12-11 18:50:53 |
Other Links: | branch diff | manifest | tags |
Context
2018-12-12
| ||
11:02 | [fx] lexicon editor: ui rework -> save button always visible check-in: 46191a94a9 user: olr tags: fx, comdic | |
2018-12-11
| ||
18:50 | [fx] page for dictionaries (draft) check-in: 09a2b4f200 user: olr tags: fx, comdic | |
2018-12-10
| ||
17:56 | [fx] lexicon editor: launch from main panel and prevent multi-tabs check-in: 52dc932e38 user: olr tags: fx, comdic | |
Changes
Modified gc_lang/fr/webext/background.js from [50b00ff19b] to [cd2d827524].
︙ | ︙ | |||
220 221 222 223 224 225 226 227 228 229 230 231 232 233 | break; case "openConjugueurTab": openConjugueurTab(); break; case "openLexiconEditor": openLexiconEditor(dParam["dictionary"]); break; default: console.log("[background] Unknown command: " + sCommand); console.log(oRequest); } //sendResponse({response: "response from background script"}); } | > > | 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 | break; case "openConjugueurTab": openConjugueurTab(); break; case "openLexiconEditor": openLexiconEditor(dParam["dictionary"]); break; case "openDictionaries": openDictionaries(); default: console.log("[background] Unknown command: " + sCommand); console.log(oRequest); } //sendResponse({response: "response from background script"}); } |
︙ | ︙ | |||
361 362 363 364 365 366 367 | openLexiconEditor(); break; } }); /* | | > > > > | 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 | openLexiconEditor(); break; } }); /* Tabs */ let nTabLexiconEditor = null; let nTabDictionaries = null; browser.tabs.onRemoved.addListener(function (nTabId, xRemoveInfo) { if (nTabId === nTabLexiconEditor) { nTabLexiconEditor = null; } else if (nTabId === nTabDictionaries) { nTabDictionaries = null; } }); /* Actions */ |
︙ | ︙ | |||
407 408 409 410 411 412 413 414 415 416 417 418 419 420 | } } function onLexiconEditorOpened (xTab) { //console.log(xTab); nTabLexiconEditor = xTab.id; } function openConjugueurTab () { if (bChrome) { browser.tabs.create({ url: browser.extension.getURL("panel/conjugueur.html") }); return; | > > > > > > > > > > > > > > > > > > > > | 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 | } } function onLexiconEditorOpened (xTab) { //console.log(xTab); nTabLexiconEditor = xTab.id; } function openDictionaries () { if (nTabDictionaries === null) { if (bChrome) { browser.tabs.create({ url: browser.extension.getURL("panel/dictionaries.html") }, onDictionariesOpened); return; } let xLexEditor = browser.tabs.create({ url: browser.extension.getURL("panel/dictionaries.html") }); xLexEditor.then(onDictionariesOpened, onError); } } function onDictionariesOpened (xTab) { //console.log(xTab); nTabDictionaries = xTab.id; } function openConjugueurTab () { if (bChrome) { browser.tabs.create({ url: browser.extension.getURL("panel/conjugueur.html") }); return; |
︙ | ︙ |
Added gc_lang/fr/webext/panel/dictionaries.css version [70a29e3245].
> > > | 1 2 3 | /* CSS */ |
Added gc_lang/fr/webext/panel/dictionaries.html version [7c18aaae72].
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | <!DOCTYPE HTML> <html> <head> <link rel="stylesheet" type="text/css" href="dictionaries.css" /> <title>Grammalecte · Dictionnaires communautaires</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> </head> <body> <div class="inbox"> <h1>Dictionnaires communautaires</h1> <div id="lexicon_page"> <h2>Votre lexique</h2> <div class="big_block"> <div id="save_button" class="fright"> Enregistrer </div> <p>Nombre d’entrées : <span id="num_entries">0</span>.</p> </div> <table id="lexicon_table"> </table> </div> <!-- #lexicon_page --> </div> <script src="../grammalecte/graphspell/helpers.js"></script> <script src="../grammalecte/graphspell/char_player.js"></script> <script src="../grammalecte/graphspell/str_transform.js"></script> <script src="../grammalecte/graphspell/dawg.js"></script> <script src="../grammalecte/graphspell/ibdawg.js"></script> <script src="../grammalecte/graphspell/spellchecker.js"></script> <script src="../grammalecte/fr/conj.js"></script> <script src="../grammalecte/fr/conj_generator.js"></script> <script src="../grammalecte/fr/lexicographe.js"></script> <script src="dictionaries.js"></script> </body> </html> |
Added gc_lang/fr/webext/panel/dictionaries.js version [0a699fc4f2].
> > > > | 1 2 3 4 | // JavaScript "use strict"; |
Modified gc_lang/fr/webext/panel/main.css from [11481222d3] to [2045c317c1].
︙ | ︙ | |||
282 283 284 285 286 287 288 289 | color: hsl(0, 10%, 96%); } #sc_options_page h2 { margin-top: 20px; font: normal 22px 'Yanone Kaffeesatz', "Oswald", "Liberation Sans Narrow", sans-serif; color: hsl(210, 50%, 50%); } .dic_button { | > > > > > | | 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 | color: hsl(0, 10%, 96%); } #sc_options_page h2 { margin-top: 20px; font: normal 22px 'Yanone Kaffeesatz', "Oswald", "Liberation Sans Narrow", sans-serif; color: hsl(210, 50%, 50%); } .button_row { display: flex; flex-direction: row-reverse; padding: 5px 0 0 0; } .dic_button { margin-left: 10px; padding: 2px 10px; background-color: hsl(210, 50%, 50%); color: hsl(210, 10%, 96%); cursor: pointer; font-size: 14px; font-variant-caps: small-caps; border-radius: 3px; |
︙ | ︙ |
Modified gc_lang/fr/webext/panel/main.html from [cca667b1f3] to [1b3aaac6d0].
︙ | ︙ | |||
110 111 112 113 114 115 116 | <h2>DICTIONNAIRES DE GRAMMALECTE</h2> <div class="option_section" id="main_dic_box"> <p><input type="checkbox" id="main_dic" data-dictionary="main" checked disabled="disabled" /> <label for="main_dic">Dictionnaire principal</label></p> <p class="option_description">Environ 83 000 entrées, 500 000 flexions.<br/>Ni éditable, ni désactivable.<br/>Ce dictionnaire est créé à partir du dictionnaire orthographique pour Firefox et LibreOffice, conçu sur le <a id="link_grammalecte" class="link" data-url="http://grammalecte.net/home.php?prj=fr">site de Grammalecte</a>.</p> </div> <div class="option_section" id="community_dic_box"> <p><input type="checkbox" id="community_dic" data-dictionary="community" /> <label for="community_dic">Dictionnaire communautaire</label></p> | < > > > > < > > > | 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 | <h2>DICTIONNAIRES DE GRAMMALECTE</h2> <div class="option_section" id="main_dic_box"> <p><input type="checkbox" id="main_dic" data-dictionary="main" checked disabled="disabled" /> <label for="main_dic">Dictionnaire principal</label></p> <p class="option_description">Environ 83 000 entrées, 500 000 flexions.<br/>Ni éditable, ni désactivable.<br/>Ce dictionnaire est créé à partir du dictionnaire orthographique pour Firefox et LibreOffice, conçu sur le <a id="link_grammalecte" class="link" data-url="http://grammalecte.net/home.php?prj=fr">site de Grammalecte</a>.</p> </div> <div class="option_section" id="community_dic_box"> <p><input type="checkbox" id="community_dic" data-dictionary="community" /> <label for="community_dic">Dictionnaire communautaire</label></p> <p class="option_description">Ce dictionnaire est créé et édité via l’éditeur lexical et est sauvegardé sur un serveur en ligne accessible à tous les membres.</p> <div class="button_row"> <div class="dic_button" id="dictionaries_button">Dictionnaires en ligne</div> <div class="dic_button" id="dic_community_button">Éditer</div> </div> </div> <div class="option_section" id="personal_dic_box"> <p><input type="checkbox" id="personal_dic" data-dictionary="personal" /> <label for="personal_dic">Dictionnaire personnel</label></p> <p class="option_description">Ce dictionnaire est créé et édité via l’éditeur lexical et n’est pas partagé.</p> <div class="button_row"> <div class="dic_button" id="dic_personal_button">Éditer</div> </div> </div> </div> <div id="hunspell_options" style="display: none; opacity: .25"> <h2>DICTIONNAIRES HUNSPELL</h2> <p class="dictionaries_info">Les dictionnaires Hunspell ne sont utilisées que pour la correction orthographique proposée par Firefox (soulignement rouge).<br/><br/>Section inactive.<br/>Le système d’extension <i>WebExtension</i> ne propose pas encore d’interface de programmation pour le correcteur orthographique.</p> <div class="option_section" id="fr-FR-modern_box"> |
︙ | ︙ |
Modified gc_lang/fr/webext/panel/main.js from [1d5858eab5] to [5094773a1c].
︙ | ︙ | |||
73 74 75 76 77 78 79 80 81 82 83 84 85 86 | } else if (xElem.id == "conj_button") { browser.runtime.sendMessage({ sCommand: "openConjugueurTab", dParam: {}, dInfo: {} }); } else if (xElem.id == "dic_community_button") { browser.runtime.sendMessage({ sCommand: "openLexiconEditor", dParam: { "dictionary": "__community__"}, dInfo: {} }); | > > > > > > > | 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 | } else if (xElem.id == "conj_button") { browser.runtime.sendMessage({ sCommand: "openConjugueurTab", dParam: {}, dInfo: {} }); } else if (xElem.id == "dictionaries_button") { browser.runtime.sendMessage({ sCommand: "openDictionaries", dParam: { "dictionary": "__community__"}, dInfo: {} }); } else if (xElem.id == "dic_community_button") { browser.runtime.sendMessage({ sCommand: "openLexiconEditor", dParam: { "dictionary": "__community__"}, dInfo: {} }); |
︙ | ︙ | |||
224 225 226 227 228 229 230 | function displaySCOptions (dOptions) { if (!dOptions.hasOwnProperty("sc_options")) { console.log("no sc options found"); return; } dOptions = dOptions.sc_options; | | | | 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 | function displaySCOptions (dOptions) { if (!dOptions.hasOwnProperty("sc_options")) { console.log("no sc options found"); return; } dOptions = dOptions.sc_options; //document.getElementById("extended_dic").checked = dOptions.extended; document.getElementById("community_dic").checked = dOptions.community; document.getElementById("personal_dic").checked = dOptions.personal; } function storeSCOptions () { browser.storage.local.set({"sc_options": { extended: false, community: document.getElementById("community_dic").checked, |
︙ | ︙ |