Skip to content

Commit

Permalink
Testsuite Summary: Fix toggle buttons behavior (#8610)
Browse files Browse the repository at this point in the history
## Summary of Changes

Separate toggle button classes to prevent unwanted interactions between
Open/Close All functionality and Third Party Libraries display
  • Loading branch information
lrineau authored Nov 15, 2024
2 parents d573581 + 4a5b25d commit 4b1c130
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions Maintenance/test_handling/Summary_Script.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ function packageContainer(platforms) {

if (content.length > 0) {
const $toggleButton = $('<button>', {
class: 'toggle-button',
class: 'content-toggle-button',
text: 'Show More',
click: function() {
if ($contentSpan.is(':hidden')) {
Expand All @@ -174,7 +174,7 @@ function platformContainer(platforms) {
const tplArray = platform.tpl;
const $toggleButton = $('<button>', {
text: 'Third Party Libraries',
class: 'tpl-toggle-button toggle-button',
class: 'tpl-toggle-button',
click: function() {
$tplTable.toggle();
}
Expand Down Expand Up @@ -220,7 +220,7 @@ function platformContainer(platforms) {
}).appendTo($letterContainer);
if (directory.content.length > 0) {
const $toggleButton = $('<button>', {
class: 'toggle-button',
class: 'content-toggle-button',
text: 'Show More',
click: function() {
if ($contentSpan.is(':hidden')) {
Expand All @@ -244,12 +244,12 @@ function platformContainer(platforms) {

function openAll() {
$('.summary-content').show().css('background-color', '#D0D0E0');
$('.toggle-button').text('Show Less');
$('.content-toggle-button').text('Show Less');
}

function closeAll() {
$('.summary-content').hide().css('background-color', 'transparent');
$('.toggle-button').text('Show More');
$('.content-toggle-button').text('Show More');
}

function showVersionsForTPL(tplName) {
Expand Down
4 changes: 2 additions & 2 deletions Maintenance/test_handling/create_testresult_page
Original file line number Diff line number Diff line change
Expand Up @@ -891,8 +891,8 @@ sub create_summary_page {
</select>
<br>
<div>
<button id="open-all" class="toggle-button">Open All</button>
<button id="close-all" class="toggle-button">Close All</button>
<button id="open-all">Open All</button>
<button id="close-all">Close All</button>
</div>
<div id="main_container">
<div id="platform_container"></div>
Expand Down

0 comments on commit 4b1c130

Please sign in to comment.