Grammalecte  Check-in [44bd5f582f]

Overview
Comment:[fx] lexicographer: test list of tokens before creating node
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | fx | webext2
Files: files | file ages | folders
SHA3-256: 44bd5f582fcf16bb8e0e8e25b49bd62e621471ca14221e5a85af0694414c2ff2
User & Date: olr on 2017-08-15 08:03:55
Original Comment: [fx] lexicographer: test if lToken before creating node
Other Links: branch diff | manifest | tags
Context
2017-08-15
08:12
[core][js][py] text.getParagraph(): end of line handling check-in: ec919db910 user: olr tags: core, webext2
08:03
[fx] lexicographer: test list of tokens before creating node check-in: 44bd5f582f user: olr tags: fx, webext2
07:55
[fx] boolean to indicate if worker response is the last + adjustements for the lexicographer check-in: f83da6328b user: olr tags: fx, webext2
Changes

Modified gc_lang/fr/webext/content_scripts/lxg_content.js from [4f504dbd92] to [196128af47].

24
25
26
27
28
29
30

31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46

    addMessage: function (sClass, sText) {
        this._xContentNode.appendChild(createNode("div", {className: sClass, textContent: sText}));
    },

    addListOfTokens: function (lTokens) {
        try {

            let xNodeDiv = createNode("div", {className: "grammalecte_lxg_list_of_tokens"});
            if (lTokens.length > 0) {
                for (let oToken of lTokens) {
                    xNodeDiv.appendChild(this._createTokenNode(oToken));
                }
            } else {
                xNodeDiv.appendChild(document.createTextNode("Aucun token connu détecté.")); 
            }
            this._xContentNode.appendChild(xNodeDiv);
        }
        catch (e) {
            showError(e);
        }
    },

    _createTokenNode: function (oToken) {







>
|
<



<
|

<







24
25
26
27
28
29
30
31
32

33
34
35

36
37

38
39
40
41
42
43
44

    addMessage: function (sClass, sText) {
        this._xContentNode.appendChild(createNode("div", {className: sClass, textContent: sText}));
    },

    addListOfTokens: function (lTokens) {
        try {
            if (lTokens) {
                let xNodeDiv = createNode("div", {className: "grammalecte_lxg_list_of_tokens"});

                for (let oToken of lTokens) {
                    xNodeDiv.appendChild(this._createTokenNode(oToken));
                }

                this._xContentNode.appendChild(xNodeDiv);
            }

        }
        catch (e) {
            showError(e);
        }
    },

    _createTokenNode: function (oToken) {