Skip to content

Commit

Permalink
fix: isolate toggle button behaviors
Browse files Browse the repository at this point in the history
  • Loading branch information
SaillantNicolas committed Nov 14, 2024
1 parent 79860d2 commit 4a5b25d
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 4a5b25d

Please sign in to comment.