48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
if( !document.querySelector('body.fdiff') ){
/* Don't show the diff toggle button for /fdiff because it only
has a single file to show (and also a different DOM layout). */
document.querySelectorAll('table.diff').forEach(addToggle);
}
const icm = allToggles.length>1 ? window.fossil.page.diffControlContainer : 0;
if(icm) {
const btnAll = D.addClass(D.a("#", "Toggle all diffs"), "button");
D.append( icm, btnAll );
btnAll.addEventListener('click', function(ev){
ev.preventDefault();
ev.stopPropagation();
/* Figure out whether we want to show all or hide all: if any diffs are
toggled off, show all, else hide all. */
let show = false;
|
|
|
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
if( !document.querySelector('body.fdiff') ){
/* Don't show the diff toggle button for /fdiff because it only
has a single file to show (and also a different DOM layout). */
document.querySelectorAll('table.diff').forEach(addToggle);
}
const icm = allToggles.length>1 ? window.fossil.page.diffControlContainer : 0;
if(icm) {
const btnAll = D.addClass(D.a("#", "Show/Hide"), "button");
D.append( icm, btnAll );
btnAll.addEventListener('click', function(ev){
ev.preventDefault();
ev.stopPropagation();
/* Figure out whether we want to show all or hide all: if any diffs are
toggled off, show all, else hide all. */
let show = false;
|