Grammalecte  Diff

Differences From Artifact [2251620d6f]:

To Artifact [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
            }
        }
        catch (e) {
            showError(e);
        }
    },

    addEntriesToTable: function (n, 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;
            }
        }
        this.updateData();
    },

    deleteEntry: function (iEntry) {
        oLexicon.deleteEntry(iEntry);







|







|
|







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 (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(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
        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) {
            this.lFlexion.push(aFlex);
        }
        this.nAddedEntries += n;
        this.nEntries += n;
        oWidgets.addEntriesToTable(n, lFlex);
    },

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







|
|
|


|
|
|







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 (lNewFlex) {
        let iStart = this.lFlexion.length;
        for (let aFlex of lNewFlex) {
            this.lFlexion.push(aFlex);
        }
        this.nAddedEntries += lNewFlex.length;
        this.nEntries += lNewFlex.length;
        oWidgets.addEntriesToTable(iStart, lNewFlex);
    },

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