Grammalecte  Check-in [437198b8d6]

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 on 2019-09-04 16:35:03
Other Links: branch diff | manifest | tags
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

Modified gc_lang/fr/mailext/content/lex_editor.css from [d28ca8e3b0] to [51c3b220a1].

    78     78   */
    79     79   
    80     80   #lexicon_table {
    81     81       width: 600px;
    82     82       height: 650px;
    83     83   }
    84     84   
    85         -.list_header {
    86         -    padding: 2px 10px;
           85  +.listheader {
           86  +    padding: 2px 0;
    87     87       font-weight: bold;
    88     88       background-color: hsl(0, 0%, 95%);
    89     89       border-bottom: 1px solid hsl(0, 0%, 50%);
    90     90   }
    91     91   .info_label {
    92     92       width: 120px;
    93     93   }

Modified gc_lang/fr/mailext/content/lex_editor.js from [fccff12209] to [289de26df4].

    61     61           this.iEntryIndex = 0;
    62     62           this.lEntry = [];
    63     63           this.nEntry = 0
    64     64           this._createHeader();
    65     65       }
    66     66   
    67     67       _createHeader () {
    68         -        let xListheadNode = createNode("richlistitem");
           68  +        let xListheadNode = createNode("richlistitem", { class: "listheader" });
    69     69           for (let i=0;  i < this.lColumn.length;  i++) {
    70         -            xListheadNode.appendChild(createNode("label", { class: "listheader", value: this.lColumn[i], flex: this.lColumnWidth[i] }));
           70  +            xListheadNode.appendChild(createNode("label", { value: this.lColumn[i], width: this.lColumnWidth[i] }));
    71     71           }
    72     72           this.xTable.appendChild(xListheadNode);
    73     73       }
    74     74   
    75     75       clear () {
    76     76           while (this.xTable.firstChild) {
    77     77               this.xTable.removeChild(this.xTable.firstChild);
................................................................................
   110    110           if (this.xNumEntry) {
   111    111               this.xNumEntry.value = this.nEntry;
   112    112           }
   113    113       }
   114    114   
   115    115       _addRow (lData) {
   116    116           let xRowNode = createNode("richlistitem", { id: this.sNodeId + "_item_" + this.iEntryIndex, value: this.iEntryIndex });
   117         -        for (let data of lData) {
   118         -            xRowNode.appendChild(createNode("label", { class:"listcell", label: data }));
          117  +        for (let i=0;  i < lData.length;  i++) {
          118  +            xRowNode.appendChild(createNode("label", { class: "listcell", value: lData[i], width: this.lColumnWidth[i] }));
   119    119           }
   120    120           this.xTable.appendChild(xRowNode);
   121    121           this.iEntryIndex += 1;
   122    122       }
   123    123   
   124    124       deleteSelection () {
   125    125           for (let xItem of this.xTable.selectedItems) {
................................................................................
   540    540               lEntry.push([sTag, sLabel.trim()]);
   541    541           }
   542    542           oTagsTable.fill(lEntry);
   543    543       }
   544    544   }
   545    545   
   546    546   
   547         -const oGenWordsTable = new Table("generated_words_table", ["Flexions", "Étiquettes"], [1, 1], "progress_new_words");
   548         -const oLexiconTable = new Table("lexicon_table", ["Flexions", "Lemmes", "Étiquettes"], [10, 7, 10], "progress_lexicon", "num_entries");
   549         -const oSearchTable = new Table("search_table", ["Flexions", "Lemmes", "Étiquettes"], [10, 7, 10], "progress_search", "search_num_entries");
   550         -const oTagsTable = new Table("tags_table", ["Étiquette", "Signification"], [1, 10], "progress_lexicon");
          547  +const oGenWordsTable = new Table("generated_words_table", ["Flexions", "Étiquettes"], ["125px", "225px"], "progress_new_words");
          548  +const oLexiconTable = new Table("lexicon_table", ["Flexions", "Lemmes", "Étiquettes"], ["190px", "150px", "200px"], "progress_lexicon", "num_entries");
          549  +const oSearchTable = new Table("search_table", ["Flexions", "Lemmes", "Étiquettes"], ["190px", "150px", "200px"], "progress_search", "search_num_entries");
          550  +const oTagsTable = new Table("tags_table", ["Étiquette", "Signification"], ["75px", "475px"], "progress_lexicon");
   551    551   
   552    552   conj.init(helpers.loadFile("resource://grammalecte/fr/conj_data.json"));
   553    553   
   554    554   
   555    555   oTagsInfo.load();
   556    556   oSearch.load();
   557    557   oBinaryDict.load();
   558    558   oBinaryDict.listen();
   559    559   oGenerator.listen();
   560    560   oSearch.listen();