Grammalecte  Check-in [fbf4f3afee]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:[fx] add a lexicon editor entry to the menu
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | fx
Files: files | file ages | folders
SHA3-256:fbf4f3afee07e64ec198e7ae8400e1348cf1bf917d5a0debfd3f3bb68484d1b3
User & Date: olr 2019-04-03 15:02:31
Context
2019-04-03
16:01
[fx] fix lexicon editor check-in: 468fa05728 user: olr tags: fx, trunk
15:02
[fx] add a lexicon editor entry to the menu check-in: fbf4f3afee user: olr tags: fx, trunk
14:52
[fx] remove access to community dictionaries check-in: 1a047a0b91 user: olr tags: fx, trunk
Changes

Changes to gc_lang/fr/webext/background.js.

256
257
258
259
260
261
262



263
264
265
266
267
268
269
                browser.tabs.create({url: dParam.sURL});
                break;
            case "openConjugueurTab":
                openConjugueurTab();
                break;
            case "openConjugueurWindow":
                openConjugueurWindow();



                break;
            default:
                console.log("[background] Unknown command: " + sCommand);
                console.log(oRequest);
        }
    });
    //xPort.postMessage({sActionDone: "newId", result: iPortId});







>
>
>







256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
                browser.tabs.create({url: dParam.sURL});
                break;
            case "openConjugueurTab":
                openConjugueurTab();
                break;
            case "openConjugueurWindow":
                openConjugueurWindow();
                break;
            case "openLexiconEditor":
                openLexiconEditor();
                break;
            default:
                console.log("[background] Unknown command: " + sCommand);
                console.log(oRequest);
        }
    });
    //xPort.postMessage({sActionDone: "newId", result: iPortId});

Changes to gc_lang/fr/webext/content_scripts/menu.js.

114
115
116
117
118
119
120







121
122
123
124
125
126
127
                xGrammalectePort.postMessage({
                    sCommand: "parseAndSpellcheck",
                    dParam: {sText: this._getText(), sCountry: "FR", bDebug: false, bContext: false},
                    dInfo: {sTextAreaId: this.xNode.id}
                });
            };
            xMenu.appendChild(xGCButton);







            // Conjugation tool
            let xConjButton = oGrammalecte.createNode("div", {className: "grammalecte_menu_item_block", textContent: "Conjugueur"});
            let xConjButtonTab = oGrammalecte.createNode("div", {className: "grammalecte_menu_button", textContent: "Onglet"});
            xConjButtonTab.onclick = () => {
                this.switchMenu();
                xGrammalectePort.postMessage({sCommand: "openConjugueurTab", dParam: null, dInfo: null});
            };







>
>
>
>
>
>
>







114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
                xGrammalectePort.postMessage({
                    sCommand: "parseAndSpellcheck",
                    dParam: {sText: this._getText(), sCountry: "FR", bDebug: false, bContext: false},
                    dInfo: {sTextAreaId: this.xNode.id}
                });
            };
            xMenu.appendChild(xGCButton);
            // Lexicon editor
            let xLEButton = oGrammalecte.createNode("div", {className: "grammalecte_menu_item", textContent: "Éditeur lexical"});
            xLEButton.onclick = () => {
                this.switchMenu();
                xGrammalectePort.postMessage({sCommand: "openLexiconEditor", dParam: null, dInfo: null});
            };
            xMenu.appendChild(xLEButton);
            // Conjugation tool
            let xConjButton = oGrammalecte.createNode("div", {className: "grammalecte_menu_item_block", textContent: "Conjugueur"});
            let xConjButtonTab = oGrammalecte.createNode("div", {className: "grammalecte_menu_button", textContent: "Onglet"});
            xConjButtonTab.onclick = () => {
                this.switchMenu();
                xGrammalectePort.postMessage({sCommand: "openConjugueurTab", dParam: null, dInfo: null});
            };