Grammalecte  Check-in [d66c46e64b]

Overview
Comment:[fx][bug] lexicon editor: fix count of new entries
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | fx
Files: files | file ages | folders
SHA3-256: d66c46e64b01aebabdb9f1b3826a0e4bac541284907dbcc6da930a9bbdf9b6dd
User & Date: olr on 2018-02-12 14:00:01
Other Links: manifest | tags
Context
2018-02-12
23:36
[fr] pt: à l’époque check-in: 067013544a user: olr tags: trunk, fr
14:00
[fx][bug] lexicon editor: fix count of new entries check-in: d66c46e64b user: olr tags: trunk, fx
13:41
[graphspell][js] ibdawg: don’t reset this.sByDic check-in: f3ed6e3893 user: olr tags: trunk, graphspell
Changes

Modified gc_lang/fr/webext/panel/lex_editor.js from [2251620d6f] to [629a2b4b0e].

237
238
239
240
241
242
243
244

245
246
247
248
249
250
251
252
253


254
255
256
257
258
259
260
237
238
239
240
241
242
243

244
245
246
247
248
249
250
251


252
253
254
255
256
257
258
259
260







-
+







-
-
+
+







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

    addEntriesToTable: function (n, lFlex) {
    addEntriesToTable: function (iStart, lFlex) {
        let xTable = document.getElementById("table");
        if (lFlex.length > 0) {
            if (document.getElementById("no_elem_line").style.display !== "none") {
                this.hideElement("no_elem_line");
                xTable.appendChild(this.createTableHeader());
            }
            for (let [sFlexion, sLemma, sTags] of lFlex) {
                xTable.appendChild(this.createRowNode(n, sFlexion, sLemma, sTags));
                n += 1;
                xTable.appendChild(this.createRowNode(iStart, sFlexion, sLemma, sTags));
                iStart += 1;
            }
        }
        this.updateData();
    },

    deleteEntry: function (iEntry) {
        oLexicon.deleteEntry(iEntry);
529
530
531
532
533
534
535
536
537
538



539
540
541
542
543



544
545
546
547
548
549
550
529
530
531
532
533
534
535



536
537
538
539
540



541
542
543
544
545
546
547
548
549
550







-
-
-
+
+
+


-
-
-
+
+
+







        if (this.lFlexion.length > 0) {
            oWidgets.showElement("export_button");
        } else {
            oWidgets.hideElement("export_button");
        }
    },

    addFlexions: function (lFlex) {
        let n = lFlex.length;
        for (let aFlex of lFlex) {
    addFlexions: function (lNewFlex) {
        let iStart = this.lFlexion.length;
        for (let aFlex of lNewFlex) {
            this.lFlexion.push(aFlex);
        }
        this.nAddedEntries += n;
        this.nEntries += n;
        oWidgets.addEntriesToTable(n, lFlex);
        this.nAddedEntries += lNewFlex.length;
        this.nEntries += lNewFlex.length;
        oWidgets.addEntriesToTable(iStart, lNewFlex);
    },

    deleteEntry: function (iEntry) {
        this.lFlexion[parseInt(iEntry)] = null;
        this.nDeletedEntries++;
        this.nEntries--;
    },