Grammalecte  Diff

Differences From Artifact [7b655e7cc2]:

To Artifact [de46feffb0]:


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

39
40
41
42
43
44
45







-







            });
            document.getElementById('otco').addEventListener("click", (xEvent) => {
                this._displayResults();
            });
        }
        catch (e) {
            console.error(e);
            // Cu.reportError(e);
        }
        this.conjugate("être");
    },

    oVerb: null,

    getVerbAndConjugate: function () {
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
80
81
82
83
84
85
86

87
88
89
90
91
92
93
94

95
96

97
98
99
100
101
102
103







-








-


-







                    document.getElementById('verb_title').textContent = sVerb;
                    document.getElementById('verb').style = "color: #999999;";
                    document.getElementById('verb').value = "";
                    this.oVerb = new Verb(sVerb);
                    document.getElementById('info').textContent = this.oVerb.sInfo;
                    document.getElementById('opro').label = this.oVerb.sProLabel;
                    if (this.oVerb.bUncomplete) {
                        console.log("uncomplete");
                        document.getElementById('opro').checked = false;
                        document.getElementById('opro').disabled = true;
                        document.getElementById('opro').style = "color: #CCC;";
                        document.getElementById('otco').checked = false;
                        document.getElementById('otco').disabled = true;
                        document.getElementById('otco').style = "color: #CCC;";
                        document.getElementById('smallnote').hidden = false;
                    } else {
                        console.log("complete");
                        document.getElementById('otco').disabled = false;
                        document.getElementById('otco').style = "color: #000;";
                        console.log("pron:", this.oVerb.nPronominable);
                        if (this.oVerb.nPronominable == 0) {
                            document.getElementById('opro').checked = false;
                            document.getElementById('opro').disabled = false;
                            document.getElementById('opro').style = "color: #000;";
                        } else if (this.oVerb.nPronominable == 1) {
                            document.getElementById('opro').checked = true;
                            document.getElementById('opro').disabled = true;
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
111
112
113
114
115
116
117

118
119
120
121
122
123
124







-







                    }
                    this._displayResults();
                }
            }
        }
        catch (e) {
            console.error(e);
            // Cu.reportError(e);
        }
    },

    _displayResults: function () {
        if (this.oVerb === null) {
            return;
        }
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
206
207
208
209
210
211
212

213
214

215
216
217
218







-


-




            document.getElementById('simp3').textContent = oConjTable["simp3"] || " ";
            document.getElementById('simp4').textContent = oConjTable["simp4"] || " ";
            document.getElementById('simp5').textContent = oConjTable["simp5"] || " ";
            document.getElementById('simp6').textContent = oConjTable["simp6"] || " ";
        }
        catch (e) {
            console.error(e);
            // Cu.reportError(e);
        }
    }

};

conj.init(helpers.loadFile("resource://grammalecte/fr/conj_data.json"));
oConj.init();