Fossil SCM
Fix tree-view JS error/warnings.
Commit
94fcef10519134527a142121c64875a7ff8c98dd
Parent
4d7f7e96d4ecbec…
1 file changed
+3
-2
+3
-2
| --- src/browse.c | ||
| +++ src/browse.c | ||
| @@ -656,18 +656,19 @@ | ||
| 656 | 656 | @ |
| 657 | 657 | @ var outer_ul = document.querySelector('.filetree > ul'); |
| 658 | 658 | @ var subdir = outer_ul.querySelector('.subdir'); |
| 659 | 659 | @ outer_ul.onclick = function( e ){ |
| 660 | 660 | @ var a = e.target; |
| 661 | - @ if( a.nodeName!='A' ) return; | |
| 661 | + @ if( a.nodeName!='A' ) return true; | |
| 662 | 662 | @ if( a.parentNode==subdir ){ |
| 663 | 663 | @ toggleAll(outer_ul); |
| 664 | 664 | @ return false; |
| 665 | 665 | @ } |
| 666 | - @ if( !subdir.contains(a) ) return; | |
| 666 | + @ if( !subdir.contains(a) ) return true; | |
| 667 | 667 | @ var ul = a.nextSibling; |
| 668 | 668 | @ while( ul && ul.nodeName!='UL' ) ul = ul.nextSibling; |
| 669 | + @ if( !ul ) return true; /* This is a file link, not a directory */ | |
| 669 | 670 | @ ul.style.display = style(ul, 'display')=='none' ? 'block' : 'none'; |
| 670 | 671 | @ return false; |
| 671 | 672 | @ } |
| 672 | 673 | @ }())</script> |
| 673 | 674 | style_footer(); |
| 674 | 675 |
| --- src/browse.c | |
| +++ src/browse.c | |
| @@ -656,18 +656,19 @@ | |
| 656 | @ |
| 657 | @ var outer_ul = document.querySelector('.filetree > ul'); |
| 658 | @ var subdir = outer_ul.querySelector('.subdir'); |
| 659 | @ outer_ul.onclick = function( e ){ |
| 660 | @ var a = e.target; |
| 661 | @ if( a.nodeName!='A' ) return; |
| 662 | @ if( a.parentNode==subdir ){ |
| 663 | @ toggleAll(outer_ul); |
| 664 | @ return false; |
| 665 | @ } |
| 666 | @ if( !subdir.contains(a) ) return; |
| 667 | @ var ul = a.nextSibling; |
| 668 | @ while( ul && ul.nodeName!='UL' ) ul = ul.nextSibling; |
| 669 | @ ul.style.display = style(ul, 'display')=='none' ? 'block' : 'none'; |
| 670 | @ return false; |
| 671 | @ } |
| 672 | @ }())</script> |
| 673 | style_footer(); |
| 674 |
| --- src/browse.c | |
| +++ src/browse.c | |
| @@ -656,18 +656,19 @@ | |
| 656 | @ |
| 657 | @ var outer_ul = document.querySelector('.filetree > ul'); |
| 658 | @ var subdir = outer_ul.querySelector('.subdir'); |
| 659 | @ outer_ul.onclick = function( e ){ |
| 660 | @ var a = e.target; |
| 661 | @ if( a.nodeName!='A' ) return true; |
| 662 | @ if( a.parentNode==subdir ){ |
| 663 | @ toggleAll(outer_ul); |
| 664 | @ return false; |
| 665 | @ } |
| 666 | @ if( !subdir.contains(a) ) return true; |
| 667 | @ var ul = a.nextSibling; |
| 668 | @ while( ul && ul.nodeName!='UL' ) ul = ul.nextSibling; |
| 669 | @ if( !ul ) return true; /* This is a file link, not a directory */ |
| 670 | @ ul.style.display = style(ul, 'display')=='none' ? 'block' : 'none'; |
| 671 | @ return false; |
| 672 | @ } |
| 673 | @ }())</script> |
| 674 | style_footer(); |
| 675 |