Skip to content

Commit c40e018

Browse files
authored
Merge pull request #33 from aabughosh/fixTable
add the missing imports for redhat table
2 parents a85663f + 23be5d2 commit c40e018

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

html/index.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,13 @@
5151
import '@patternfly/elements/pf-text-input/pf-text-input.js';
5252
import '@rhds/elements/rh-tabs/rh-tabs.js';
5353
import '@rhds/elements/rh-accordion/rh-accordion.js';
54+
import '@rhds/elements/rh-table/rh-table.js';
5455
import 'https://jspm.dev/@rhds/elements/rh-tag/rh-tag.js'
5556
</script>
5657
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha256-2TnSHycBDAm2wpZmgdi0z81kykGPJAkiUY+Wf97RbvY=" crossorigin="anonymous">
5758
<link rel="stylesheet" href="https://getbootstrap.com/docs/5.3/assets/css/docs.css" integrity="sha256-X0cPqbNml7z/f/z7c1HiTdJ2aSO4QmaAMDnESV5n7fE=" crossorigin="anonymous">
58-
59-
<link inline rel="stylesheet" href="style.css">
59+
<link rel="stylesheet"
60+
href="https://ux.redhat.com/assets/packages/@rhds/elements/elements/rh-table/rh-table-lightdom.css"> <link inline rel="stylesheet" href="style.css">
6061
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dayjs.min.js" integrity="sha256-NTsR4SOm3YHfJrmrmvBtEYqfQ6jQ5yvEKMhgQe3DIl0=" crossorigin="anonymous"></script>
6162
<script src="https://cdn.jsdelivr.net/npm/[email protected]/plugin/duration.min.js" integrity="sha256-6rug74IKp6v/8WINJxMw33zXo8NVOdRw/5Ib21ZzwU4=" crossorigin="anonymous"></script>
6263
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.0/jquery.min.js" integrity="sha256-2Pmvv0kuTBOenSvLm6bvfBSSHrUJ+3A7x6P5Ebd07/g=" crossorigin="anonymous"></script>

html/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,9 +199,10 @@ function hideAllResultsTabObjects () {
199199
// fills the "version" tab element with the data from the claim.json passed in input
200200
function fillVersionsElement (input, element) {
201201
$(element).empty()
202-
$('<thead><tr><th scope="col">Component</th><th scope="col">Version</th></tr></thead><tbody>').appendTo($(element))
202+
$('<colgroup><col><col></colgroup><thead><tr><th scope="col" data-label="Component">Component</th>' +
203+
'<th scope="col" data-label="Version">Version</th></tr></thead><tbody>').appendTo($(element))
203204
for (const key in input) {
204-
$('<tr><td><b>' + key + '</b></td><td>' + input[key] + '</td></tr>').appendTo($(element))
205+
$('<tr><td data-label="Component"><b>' + key + '</b></td><td data-label="Version">' + input[key] + '</td></tr>').appendTo($(element))
205206
}
206207
$('</tbody>').appendTo($(element))
207208
}

0 commit comments

Comments
 (0)