Grammalecte  Diff

Differences From Artifact [d0cd9c03ec]:

To Artifact [ba5504f4c4]:


182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
    },

    startGCPanel: function (what, xResultNode=null) {
        this.createGCPanel();
        this.oGCPanel.clear();
        this.oGCPanel.show();
        this.oGCPanel.showEditor();
        this.oGCPanel.start(what);
        this.oGCPanel.startWaitIcon();
        if (what) {
            let sText = this.oGCPanel.oTextControl.getText();
            oGrammalecteBackgroundPort.parseAndSpellcheck(sText, "__GrammalectePanel__");
        }
    },

    showMessage: function (sMessage) {
        this.createMessageBox();
        this.oMessageBox.show();
        this.oMessageBox.setMessage(sMessage);
    },







|

<
|
|
<







182
183
184
185
186
187
188
189
190

191
192

193
194
195
196
197
198
199
    },

    startGCPanel: function (what, xResultNode=null) {
        this.createGCPanel();
        this.oGCPanel.clear();
        this.oGCPanel.show();
        this.oGCPanel.showEditor();
        this.oGCPanel.start(what, xResultNode);
        this.oGCPanel.startWaitIcon();

        let sText = this.oGCPanel.oTextControl.getText();
        oGrammalecteBackgroundPort.parseAndSpellcheck(sText, "__GrammalectePanel__");

    },

    showMessage: function (sMessage) {
        this.createMessageBox();
        this.oMessageBox.show();
        this.oMessageBox.setMessage(sMessage);
    },
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
            case "openPanelForNode":
                if (oCommand.xNode) {
                    oGrammalecte.startGCPanel(oCommand.xNode);
                }
                break;
            case "openPanelForText":
                if (oCommand.sText) {
                    oGrammalecte.startGCPanel(oCommand.sText);
                }
                break;
            case "parseNode":
                if (oCommand.xNode  &&  oCommand.xNode.id) {
                    if (oCommand.xNode.tagName == "TEXTAREA"  ||  oCommand.xNode.tagName == "INPUT") {
                        oGrammalecteBackgroundPort.parseAndSpellcheck(oCommand.xNode.value, oCommand.xNode.id);
                    }
                    else if (oCommand.xNode.tagName == "IFRAME") {
                        oGrammalecteBackgroundPort.parseAndSpellcheck(oCommand.xNode.contentWindow.document.body.innerText, oCommand.xNode.id);
                    }
                    else {
                        oGrammalecteBackgroundPort.parseAndSpellcheck(oCommand.xNode.innerText, oCommand.xNode.id);
                    }
                }





                break;
            case "getSpellSuggestions":
                if (oCommand.sWord) {
                    oGrammalecteBackgroundPort.getSpellSuggestions(oCommand.sWord, oCommand.sDestination, oCommand.sErrorId);
                }
                break;
            default:







|














>
>
>
>
>







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
            case "openPanelForNode":
                if (oCommand.xNode) {
                    oGrammalecte.startGCPanel(oCommand.xNode);
                }
                break;
            case "openPanelForText":
                if (oCommand.sText) {
                    oGrammalecte.startGCPanel(oCommand.sText, oCommand.xNode);
                }
                break;
            case "parseNode":
                if (oCommand.xNode  &&  oCommand.xNode.id) {
                    if (oCommand.xNode.tagName == "TEXTAREA"  ||  oCommand.xNode.tagName == "INPUT") {
                        oGrammalecteBackgroundPort.parseAndSpellcheck(oCommand.xNode.value, oCommand.xNode.id);
                    }
                    else if (oCommand.xNode.tagName == "IFRAME") {
                        oGrammalecteBackgroundPort.parseAndSpellcheck(oCommand.xNode.contentWindow.document.body.innerText, oCommand.xNode.id);
                    }
                    else {
                        oGrammalecteBackgroundPort.parseAndSpellcheck(oCommand.xNode.innerText, oCommand.xNode.id);
                    }
                }
                break;
            case "parseText":
                if (oCommand.sText  &&  oCommand.xNode) {
                    oGrammalecteBackgroundPort.parseAndSpellcheck(oCommand.sText, oCommand.xNode.id);
                }
                break;
            case "getSpellSuggestions":
                if (oCommand.sWord) {
                    oGrammalecteBackgroundPort.getSpellSuggestions(oCommand.sWord, oCommand.sDestination, oCommand.sErrorId);
                }
                break;
            default: