Grammalecte  Diff

Differences From Artifact [f4ff64b873]:

To Artifact [952baf8eed]:


135
136
137
138
139
140
141
142

143
144
145
146
147
148
149
150
151
152
135
136
137
138
139
140
141

142
143
144

145
146
147
148
149
150
151







-
+


-







        this.xMenu.appendChild(this.xTFButton)
        this.xMenu.appendChild(this.xEditorButton)
        this.xMenu.appendChild(this.xLxgButton)
        this.xMenu.appendChild(this.xConjButton)
        this.xPanelBar.appendChild(this.xMenu);
    }

    start (what, bResultInEvent=false) {
    start (what) {
        this.oTooltip.hide();
        this.bWorking = false;
        this.oTextControl.bResultInEvent = bResultInEvent;
        this.clear();
        this.hideMessage();
        this.resetTimer();
        if (typeof(what) === "string") {
            // text
            this.xNode = null;
            this.oTextControl.setText(what);
962
963
964
965
966
967
968

969
970
971
972
973
974
975
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975







+







        this.clear();
        this.xNode = xNode;
        this.bTextArea = (xNode.tagName == "TEXTAREA" || xNode.tagName == "INPUT");
        if (!this.bTextArea) {
            oGrammalecte.oGCPanel.addMessageToGCPanel("Attention : La zone de texte analysée est un champ textuel enrichi susceptible de contenir des éléments non textuels qui seront effacés lors de la correction.");
        }
        this.xNode.disabled = true;
        this.bResultInEvent = Boolean(xNode.dataset.grammalecte_callbutton);
        this.loadText((this.bTextArea) ? this.xNode.value : this.xNode.innerText);
    }

    setText (sText) {
        this.clear();
        oGrammalecte.oGCPanel.addMessageToGCPanel("Note : Aucun champ textuel défini. Les changements ne seront pas répercutés sur la zone d’où le texte a été extrait.");
        this.loadText(sText);