|
22 | 22 | p { |
23 | 23 | margin: 5px 0; |
24 | 24 | } |
| 25 | + |
25 | 26 | </style> |
26 | 27 | <!-- <script src="validation.js"</script> --> |
27 | 28 | <script type="text/javascript"> |
|
212 | 213 | } |
213 | 214 | } |
214 | 215 |
|
215 | | - let th = table.insertRow(); |
216 | | - let td = th.insertCell(); |
217 | | - td.innerHTML = "Test Type"; |
| 216 | + // header row |
| 217 | + |
| 218 | + let tr_header = table.insertRow(); |
| 219 | + let th = document.createElement("th"); |
| 220 | + th.className += ' headclass'; |
| 221 | + tr_header.appendChild(th); |
| 222 | + th.innerHTML = "Test Type"; |
218 | 223 |
|
219 | 224 | for (const exec of executed_platforms) { |
220 | | - td = th.insertCell(); |
221 | | - td.innerHTML = exec; |
222 | | - td.style.textAlign = 'center'; |
223 | | - td = th.insertCell(); |
224 | | - td.innerHTML = "Details"; |
| 225 | + let th = document.createElement("th"); |
| 226 | + th.className += ' headclass'; |
| 227 | + tr_header.appendChild(th); |
| 228 | + th.innerHTML = exec; |
| 229 | + th.style.textAlign = 'center'; |
| 230 | + |
| 231 | + let th_details = document.createElement("th"); |
| 232 | + th_details.className += ' headclass'; |
| 233 | + tr_header.appendChild(th_details); |
| 234 | + th_details.innerHTML = "Details"; |
225 | 235 | } |
226 | 236 |
|
| 237 | + // other rows after header |
| 238 | + |
227 | 239 | let background_color; |
228 | 240 | for (const test_type of test_types) { |
229 | 241 | tr = table.insertRow(); |
|
321 | 333 | td.innerHTML = "%s not tested in %s" % (test_type, exec); |
322 | 334 | td.style.textAlign = "center"; |
323 | 335 | } |
| 336 | + |
| 337 | + // Unset position style to not conflict with the position: sticky style of the header row |
| 338 | + first_div_child = td.getElementsByTagName("div")[0]; |
| 339 | + first_div_child.style.position = ""; |
| 340 | + first_div_grandchild = first_div_child.getElementsByTagName("div")[0]; |
| 341 | + first_div_grandchild.style.position = ""; |
| 342 | + first_div_grand_grandchild = first_div_grandchild.getElementsByTagName("div")[0]; |
| 343 | + first_div_grand_grandchild.style.position = ""; |
324 | 344 | } |
325 | 345 | td = tr.insertCell(); |
326 | 346 | td.innerHTML = details.join(''); |
|
354 | 374 | th { |
355 | 375 | font-weight: bold; |
356 | 376 | text-align: center; |
| 377 | + position: sticky; |
| 378 | + top: 0; |
| 379 | + background-color: white; |
| 380 | + box-shadow: 5px 5px white, -5px 5px white, -5px -5px white, 5px -5px white; |
357 | 381 | } |
358 | 382 |
|
359 | 383 | #exec_test_table th { |
|
0 commit comments