Merge remote-tracking branch 'SaillantNicolas/List-third-party-libraries-GF'

This commit is contained in:
Laurent Rineau 2024-09-30 13:01:32 +02:00
commit 1f3d820a42
3 changed files with 23 additions and 33 deletions

View File

@ -174,7 +174,7 @@ function platformContainer(platforms) {
const tplArray = platform.tpl; const tplArray = platform.tpl;
const $toggleButton = $('<button>', { const $toggleButton = $('<button>', {
text: 'Third Party Libraries', text: 'Third Party Libraries',
class: 'tpl-toggle-button', class: 'tpl-toggle-button toggle-button',
click: function() { click: function() {
$tplTable.toggle(); $tplTable.toggle();
} }
@ -193,17 +193,15 @@ function platformContainer(platforms) {
$('<th>', { text: 'Version' }).appendTo($headerRow); $('<th>', { text: 'Version' }).appendTo($headerRow);
$headerRow.appendTo($thead); $headerRow.appendTo($thead);
tplArray.forEach(tpl => { tplArray.forEach(tpl => {
$('<tr>').append( const $row = $('<tr>').append(
$('<td>').html(`<a href="#" class="tpl-link" data-tpl="${tpl.name}">${tpl.name}</a>`), $('<td>').text(tpl.name),
$('<td>').text(tpl.version || 'N/A'), $('<td>').text(tpl.version || 'N/A'),
).appendTo($tbody); ).appendTo($tbody);
$row.addClass('tpl-row');
$row.click(function() {
showVersionsForTPL(tpl.name);
}); });
$('.tpl-link').click(function(event) {
event.preventDefault();
const tplName = $(this).data('tpl');
showVersionsForTPL(tplName);
}); });
const letters = ['n', 'w', 'o', 'r']; const letters = ['n', 'w', 'o', 'r'];
letters.forEach(letter => { letters.forEach(letter => {
const $letterContainer = $('<div>', { class: 'letter_container ' + letter }).appendTo($container); const $letterContainer = $('<div>', { class: 'letter_container ' + letter }).appendTo($container);

View File

@ -884,8 +884,8 @@ sub create_summary_page {
</select> </select>
<br> <br>
<div> <div>
<button id="open-all">Open All</button> <button id="open-all" class="toggle-button">Open All</button>
<button id="close-all">Close All</button> <button id="close-all" class="toggle-button">Close All</button>
</div> </div>
<div id="main_container"> <div id="main_container">
<div id="platform_container"></div> <div id="platform_container"></div>

View File

@ -92,7 +92,12 @@ TABLE.result TD > a.package_name {
} }
.toggle-button { .toggle-button {
text-decoration: underline; color: #333;
background-color: #f0f0f0;
border: 1px solid #ccc;
cursor: pointer;
text-align: center;
border-radius: 5px;
} }
.summary-content{ .summary-content{
@ -145,29 +150,20 @@ TABLE.result TD > a.package_name {
.tpl-toggle-button { .tpl-toggle-button {
display: inline-block; display: inline-block;
margin-bottom: 10px; padding: 0.3em 0.5em;
padding: 6px 12px;
font-size: 14px; font-size: 14px;
color: #333;
background-color: #f0f0f0;
border: 1px solid #ccc;
cursor: pointer;
text-align: center;
text-decoration: underline;
} }
.tpl-toggle-button:hover { .toggle-button:hover {
background-color: #e0e0e0; background-color: #e0e0e0;
} }
.tpl-link { .tpl-row {
color: #0000EE;
text-decoration: underline;
cursor: pointer; cursor: pointer;
} }
.tpl-link:hover { .tpl-row:hover td {
color: #1A0DAB; background-color: #d1d1d1 !important;
} }
/* TPL Modal */ /* TPL Modal */
@ -248,11 +244,11 @@ table.tablesorter thead th.tablesorter-headerDesc {
padding-right: 20px; padding-right: 20px;
} }
table.tablesorter tbody tr:nth-child(odd) { table.tablesorter tbody tr:nth-child(odd) td {
background-color: #e6e6e6; background-color: #e6e6e6;
} }
table.tablesorter tbody tr:nth-child(even) { table.tablesorter tbody tr:nth-child(even) td {
background-color: #f0f0f0; background-color: #f0f0f0;
} }
@ -261,7 +257,3 @@ table.tablesorter tbody td {
border: 1px solid #ccc; border: 1px solid #ccc;
text-align: left; text-align: left;
} }
table.tablesorter tbody tr:hover {
background-color: #d1d1d1
}