Grammalecte  Check-in [c453c3dbb7]

Overview
Comment:[fx] lexicon editor: show date
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | fx
Files: files | file ages | folders
SHA3-256: c453c3dbb70219627ab2a576391a53d3d4e95dff3535d6c978b8090515faa529
User & Date: olr on 2018-02-10 13:35:35
Other Links: manifest | tags
Context
2018-02-10
13:53
[graphspell] add date to JSON dictionary check-in: 0a4c113f2c user: olr tags: trunk, graphspell
13:35
[fx] lexicon editor: show date check-in: c453c3dbb7 user: olr tags: trunk, fx
13:19
[fx] lexicon editor: fix loading check-in: 708091ec61 user: olr tags: trunk, fx
Changes

Modified gc_lang/fr/webext/panel/lex_editor.js from [0b5353d96f] to [eea97bdcc4].

559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
559
560
561
562
563
564
565









566
567
568
569
570
571
572







-
-
-
-
-
-
-
-
-







        oWidgets.hideElement("save_button");
        this.lFlexion = this.lFlexion.filter((e) => e !== null);
        oBinaryDict.build(this.lFlexion);
        this.resetModif();
        oWidgets.displayTable(this.lFlexion);
        oWidgets.updateData();
        oWidgets.setDictData(this.lFlexion.length, this._getDate());
    },

    _getDate: function () {
        let oDate = new Date();
        let sMonth = (oDate.getMonth() + 1).toString().padStart(2, "0"); // Month+1: Because JS always sucks somehow.
        let sDay = (oDate.getDay()).toString().padStart(2, "0");
        let sHours = (oDate.getHours()).toString().padStart(2, "0");
        let sMinutes = (oDate.getMinutes()).toString().padStart(2, "0");
        return `${oDate.getFullYear()}-${sMonth}-${sDay}, ${sHours}:${sMinutes}`;
    }
}


const oBinaryDict = {
    
    oJSON: null,
598
599
600
601
602
603
604

605
606
607
608
609
610
611
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603







+







        this.oJSON = oResult.oDictionary;
        this.oIBDAWG = new IBDAWG(this.oJSON);
        let lEntry = [];
        for (let s of this.oIBDAWG.select()) {
            lEntry.push(s.split("\t"));
        }        
        oLexicon.set(lEntry);
        oWidgets.setDictData(lEntry.length, oJSON.sDate);
        oWidgets.showElement("export_button");
    },

    build: function (lEntry) {
        oWidgets.showElement("build_progress");
        let xProgressNode = document.getElementById("build_progress");
        let oDAWG = new DAWG(lEntry, "Français - dictionnaire personnel", "S", xProgressNode);