Skip to content

Commit

Permalink
[TASK] Hide if nothing is to do
Browse files Browse the repository at this point in the history
  • Loading branch information
fseipel committed Oct 31, 2024
1 parent 6104305 commit 39e530a
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions Resources/Public/JavaScript/AjaxMetaGenerate.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,10 +217,17 @@ require([
total += credits;
}
}

element = document.getElementById('t3-alternative-generate-all-total-credits');
element.innerHTML = total + ' Credits';
element.setAttribute('data-credits', total);
element.style = '';
if (total) {
element.innerHTML = total + ' Credits';
element.setAttribute('data-credits', total);
element.style = '';
} else {
element.innerHTML = 'No Credits';
element.setAttribute('data-credits', 0);
element.style = 'display: none;';
}
}

function getActiveImages(skipExistingDescriptions) {
Expand Down

0 comments on commit 39e530a

Please sign in to comment.