Skip to content

Commit a5cd538

Browse files
committed
Fix dictionary table column headers and remove irrelevant CI columns
Changes: - Created addDictTableHeader() with correct column names: Documentation, Repository, License, Issues - Changed addDictRepoTable() to use addDictTableHeader() instead of generic addTableHeader() - Removed Doc CI and Core CI columns from addDictTR() - Reduced table from 6 to 4 columns - Updated addEmptyRow() to addEmptyRow(4) to match column count
1 parent 4895855 commit a5cd538

1 file changed

Lines changed: 22 additions & 4 deletions

File tree

assets/js/dicttable.js

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,34 @@ function reponame2dictname(reponame) {
4242
return code2langname[parts[1]] + ' - ' + code2langname[parts[2]] + ' (' + parts.slice(4).join('-') + ')'
4343
}
4444

45+
function addDictTableHeader() {
46+
// Creating and adding data to first row of the table
47+
let row_1 = document.createElement('tr');
48+
let heading_1 = document.createElement('th');
49+
heading_1.innerHTML = 'Documen­tation';
50+
let heading_2 = document.createElement('th');
51+
heading_2.innerHTML = 'Reposi­tory';
52+
let heading_3 = document.createElement('th');
53+
heading_3.innerHTML = 'License';
54+
let heading_4 = document.createElement('th');
55+
heading_4.innerHTML = 'Issues';
56+
57+
row_1.appendChild(heading_1);
58+
row_1.appendChild(heading_2);
59+
row_1.appendChild(heading_3);
60+
row_1.appendChild(heading_4);
61+
62+
return row_1;
63+
}
64+
4565
function addDictRepoTable(repos, mainFilter, filters) {
4666
let table = document.createElement('table');
4767
let thead = document.createElement('thead');
4868
let tbody = document.createElement('tbody');
4969

5070
table.appendChild(thead);
5171
table.appendChild(tbody);
52-
thead.appendChild(addTableHeader());
72+
thead.appendChild(addDictTableHeader());
5373

5474
for (const repo of repos) {
5575
if (repo.name.startsWith(mainFilter)) {
@@ -64,7 +84,7 @@ function addDictRepoTable(repos, mainFilter, filters) {
6484
}
6585
// If no repos found, inform the user:
6686
if (!tbody.firstChild) {
67-
tbody.appendChild(addEmptyRow());
87+
tbody.appendChild(addEmptyRow(4));
6888
}
6989
return table;
7090
}
@@ -79,8 +99,6 @@ function addDictTR(repo) {
7999
row.appendChild(addRepo(repo));
80100
row.appendChild(addRLicense(repo));
81101
row.appendChild(addIssues(repo));
82-
row.appendChild(addRDoc(repo));
83-
row.appendChild(addCI(repo));
84102

85103
return row;
86104
}

0 commit comments

Comments
 (0)