Grammalecte  Check-in [437198b8d6]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:[tb] lexicon editor: ui update
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | tb | tbme
Files: files | file ages | folders
SHA3-256:437198b8d693e9c787bd536ef32f659762ab28a3dba91b7b49efd12e9d44efab
User & Date: olr 2019-09-04 16:35:03
Context
2019-09-04
19:44
[tb] ui update check-in: 3b7d4a1c2e user: olr tags: tb, tbme
16:35
[tb] lexicon editor: ui update check-in: 437198b8d6 user: olr tags: tb, tbme
2019-09-03
18:45
[tb] ui and code update check-in: 6b3259a6bb user: olr tags: tb, tbme
Changes

Changes to gc_lang/fr/mailext/content/lex_editor.css.

78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
*/

#lexicon_table {
    width: 600px;
    height: 650px;
}

.list_header {
    padding: 2px 10px;
    font-weight: bold;
    background-color: hsl(0, 0%, 95%);
    border-bottom: 1px solid hsl(0, 0%, 50%);
}
.info_label {
    width: 120px;
}







|
|







78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
*/

#lexicon_table {
    width: 600px;
    height: 650px;
}

.listheader {
    padding: 2px 0;
    font-weight: bold;
    background-color: hsl(0, 0%, 95%);
    border-bottom: 1px solid hsl(0, 0%, 50%);
}
.info_label {
    width: 120px;
}

Changes to gc_lang/fr/mailext/content/lex_editor.js.

61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
...
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
...
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
        this.iEntryIndex = 0;
        this.lEntry = [];
        this.nEntry = 0
        this._createHeader();
    }

    _createHeader () {
        let xListheadNode = createNode("richlistitem");
        for (let i=0;  i < this.lColumn.length;  i++) {
            xListheadNode.appendChild(createNode("label", { class: "listheader", value: this.lColumn[i], flex: this.lColumnWidth[i] }));
        }
        this.xTable.appendChild(xListheadNode);
    }

    clear () {
        while (this.xTable.firstChild) {
            this.xTable.removeChild(this.xTable.firstChild);
................................................................................
        if (this.xNumEntry) {
            this.xNumEntry.value = this.nEntry;
        }
    }

    _addRow (lData) {
        let xRowNode = createNode("richlistitem", { id: this.sNodeId + "_item_" + this.iEntryIndex, value: this.iEntryIndex });
        for (let data of lData) {
            xRowNode.appendChild(createNode("label", { class:"listcell", label: data }));
        }
        this.xTable.appendChild(xRowNode);
        this.iEntryIndex += 1;
    }

    deleteSelection () {
        for (let xItem of this.xTable.selectedItems) {
................................................................................
            lEntry.push([sTag, sLabel.trim()]);
        }
        oTagsTable.fill(lEntry);
    }
}


const oGenWordsTable = new Table("generated_words_table", ["Flexions", "Étiquettes"], [1, 1], "progress_new_words");
const oLexiconTable = new Table("lexicon_table", ["Flexions", "Lemmes", "Étiquettes"], [10, 7, 10], "progress_lexicon", "num_entries");
const oSearchTable = new Table("search_table", ["Flexions", "Lemmes", "Étiquettes"], [10, 7, 10], "progress_search", "search_num_entries");
const oTagsTable = new Table("tags_table", ["Étiquette", "Signification"], [1, 10], "progress_lexicon");

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


oTagsInfo.load();
oSearch.load();
oBinaryDict.load();
oBinaryDict.listen();
oGenerator.listen();
oSearch.listen();







|

|







 







|
|







 







|
|
|
|










61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
...
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
...
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
        this.iEntryIndex = 0;
        this.lEntry = [];
        this.nEntry = 0
        this._createHeader();
    }

    _createHeader () {
        let xListheadNode = createNode("richlistitem", { class: "listheader" });
        for (let i=0;  i < this.lColumn.length;  i++) {
            xListheadNode.appendChild(createNode("label", { value: this.lColumn[i], width: this.lColumnWidth[i] }));
        }
        this.xTable.appendChild(xListheadNode);
    }

    clear () {
        while (this.xTable.firstChild) {
            this.xTable.removeChild(this.xTable.firstChild);
................................................................................
        if (this.xNumEntry) {
            this.xNumEntry.value = this.nEntry;
        }
    }

    _addRow (lData) {
        let xRowNode = createNode("richlistitem", { id: this.sNodeId + "_item_" + this.iEntryIndex, value: this.iEntryIndex });
        for (let i=0;  i < lData.length;  i++) {
            xRowNode.appendChild(createNode("label", { class: "listcell", value: lData[i], width: this.lColumnWidth[i] }));
        }
        this.xTable.appendChild(xRowNode);
        this.iEntryIndex += 1;
    }

    deleteSelection () {
        for (let xItem of this.xTable.selectedItems) {
................................................................................
            lEntry.push([sTag, sLabel.trim()]);
        }
        oTagsTable.fill(lEntry);
    }
}


const oGenWordsTable = new Table("generated_words_table", ["Flexions", "Étiquettes"], ["125px", "225px"], "progress_new_words");
const oLexiconTable = new Table("lexicon_table", ["Flexions", "Lemmes", "Étiquettes"], ["190px", "150px", "200px"], "progress_lexicon", "num_entries");
const oSearchTable = new Table("search_table", ["Flexions", "Lemmes", "Étiquettes"], ["190px", "150px", "200px"], "progress_search", "search_num_entries");
const oTagsTable = new Table("tags_table", ["Étiquette", "Signification"], ["75px", "475px"], "progress_lexicon");

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


oTagsInfo.load();
oSearch.load();
oBinaryDict.load();
oBinaryDict.listen();
oGenerator.listen();
oSearch.listen();