Fossil SCM
Make all non-hyperlink elements to the left of the show/hide diff checkboxes activate those checkboxes.
Commit
7f2b3a2d987aef9c396a124d0e482a3afa0c9af064e2696060ce1ad0ae766cdb
Parent
6bc8c5f8829a8b7…
1 file changed
+9
+9
| --- src/fossil.diff.js | ||
| +++ src/fossil.diff.js | ||
| @@ -58,10 +58,19 @@ | ||
| 58 | 58 | if(btnAll){ |
| 59 | 59 | checkedCount += (this.checked ? 1 : -1); |
| 60 | 60 | btnAll.innerText = (checkedCount < allToggles.length) |
| 61 | 61 | ? "Show diffs" : "Hide diffs"; |
| 62 | 62 | } |
| 63 | + }, false); | |
| 64 | + /* Extend the toggle click zone to all of the non-hyperlink | |
| 65 | + elements in the left of this area (filenames and hashes). */ | |
| 66 | + sib.firstElementChild.addEventListener('click', (event)=>{ | |
| 67 | + if( event.target===sib.firstElementChild ){ | |
| 68 | + /* Don't respond to clicks bubbling via hyperlink children */ | |
| 69 | + ckbox.checked = !ckbox.checked; | |
| 70 | + ckbox.dispatchEvent(new Event('change')); | |
| 71 | + } | |
| 63 | 72 | }, false); |
| 64 | 73 | }; |
| 65 | 74 | if( !document.querySelector('body.fdiff') ){ |
| 66 | 75 | /* Don't show the diff toggle button for /fdiff because it only |
| 67 | 76 | has a single file to show (and also a different DOM layout). */ |
| 68 | 77 |
| --- src/fossil.diff.js | |
| +++ src/fossil.diff.js | |
| @@ -58,10 +58,19 @@ | |
| 58 | if(btnAll){ |
| 59 | checkedCount += (this.checked ? 1 : -1); |
| 60 | btnAll.innerText = (checkedCount < allToggles.length) |
| 61 | ? "Show diffs" : "Hide diffs"; |
| 62 | } |
| 63 | }, false); |
| 64 | }; |
| 65 | if( !document.querySelector('body.fdiff') ){ |
| 66 | /* Don't show the diff toggle button for /fdiff because it only |
| 67 | has a single file to show (and also a different DOM layout). */ |
| 68 |
| --- src/fossil.diff.js | |
| +++ src/fossil.diff.js | |
| @@ -58,10 +58,19 @@ | |
| 58 | if(btnAll){ |
| 59 | checkedCount += (this.checked ? 1 : -1); |
| 60 | btnAll.innerText = (checkedCount < allToggles.length) |
| 61 | ? "Show diffs" : "Hide diffs"; |
| 62 | } |
| 63 | }, false); |
| 64 | /* Extend the toggle click zone to all of the non-hyperlink |
| 65 | elements in the left of this area (filenames and hashes). */ |
| 66 | sib.firstElementChild.addEventListener('click', (event)=>{ |
| 67 | if( event.target===sib.firstElementChild ){ |
| 68 | /* Don't respond to clicks bubbling via hyperlink children */ |
| 69 | ckbox.checked = !ckbox.checked; |
| 70 | ckbox.dispatchEvent(new Event('change')); |
| 71 | } |
| 72 | }, false); |
| 73 | }; |
| 74 | if( !document.querySelector('body.fdiff') ){ |
| 75 | /* Don't show the diff toggle button for /fdiff because it only |
| 76 | has a single file to show (and also a different DOM layout). */ |
| 77 |