Fossil SCM
Further fixes for tree-view in ancient versions of Firefox.
Commit
f69dbc361c8fc7a45e9c2fa3026c57a475a62f3c
Parent
bfe7eeb71a01c29…
2 files changed
+10
-2
+10
-2
+10
-2
| --- src/browse.c | ||
| +++ src/browse.c | ||
| @@ -676,11 +676,19 @@ | ||
| 676 | 676 | @ for( var id in expandMap ){ |
| 677 | 677 | @ if( id!=='*' ) toggleDir(gebi(id), true); |
| 678 | 678 | @ } |
| 679 | 679 | @ } |
| 680 | 680 | @ |
| 681 | - @ /* No-op shim for IE9 */ | |
| 681 | + @ function belowSubdir(node){ | |
| 682 | + @ do{ | |
| 683 | + @ node = node.parentNode; | |
| 684 | + @ if( node==subdir ) return true; | |
| 685 | + @ } while( node && node!=outer_ul ); | |
| 686 | + @ return false; | |
| 687 | + @ } | |
| 688 | + @ | |
| 689 | + @ var history = window.history || {}; | |
| 682 | 690 | @ if( !history.replaceState ) history.replaceState = function(){}; |
| 683 | 691 | @ var outer_ul = document.querySelector('.filetree > ul'); |
| 684 | 692 | @ var subdir = outer_ul.querySelector('.subdir'); |
| 685 | 693 | @ var expandMap = {}; |
| 686 | 694 | @ checkState(); |
| @@ -689,11 +697,11 @@ | ||
| 689 | 697 | @ if( a.nodeName!='A' ) return true; |
| 690 | 698 | @ if( a.parentNode==subdir ){ |
| 691 | 699 | @ toggleAll(outer_ul); |
| 692 | 700 | @ return false; |
| 693 | 701 | @ } |
| 694 | - @ if( !subdir.contains(a) ) return true; | |
| 702 | + @ if( !belowSubdir(a) ) return true; | |
| 695 | 703 | @ var ul = a.nextSibling; |
| 696 | 704 | @ while( ul && ul.nodeName!='UL' ) ul = ul.nextSibling; |
| 697 | 705 | @ if( !ul ) return true; /* This is a file link, not a directory */ |
| 698 | 706 | @ toggleDir(ul); |
| 699 | 707 | @ return false; |
| 700 | 708 |
| --- src/browse.c | |
| +++ src/browse.c | |
| @@ -676,11 +676,19 @@ | |
| 676 | @ for( var id in expandMap ){ |
| 677 | @ if( id!=='*' ) toggleDir(gebi(id), true); |
| 678 | @ } |
| 679 | @ } |
| 680 | @ |
| 681 | @ /* No-op shim for IE9 */ |
| 682 | @ if( !history.replaceState ) history.replaceState = function(){}; |
| 683 | @ var outer_ul = document.querySelector('.filetree > ul'); |
| 684 | @ var subdir = outer_ul.querySelector('.subdir'); |
| 685 | @ var expandMap = {}; |
| 686 | @ checkState(); |
| @@ -689,11 +697,11 @@ | |
| 689 | @ if( a.nodeName!='A' ) return true; |
| 690 | @ if( a.parentNode==subdir ){ |
| 691 | @ toggleAll(outer_ul); |
| 692 | @ return false; |
| 693 | @ } |
| 694 | @ if( !subdir.contains(a) ) return true; |
| 695 | @ var ul = a.nextSibling; |
| 696 | @ while( ul && ul.nodeName!='UL' ) ul = ul.nextSibling; |
| 697 | @ if( !ul ) return true; /* This is a file link, not a directory */ |
| 698 | @ toggleDir(ul); |
| 699 | @ return false; |
| 700 |
| --- src/browse.c | |
| +++ src/browse.c | |
| @@ -676,11 +676,19 @@ | |
| 676 | @ for( var id in expandMap ){ |
| 677 | @ if( id!=='*' ) toggleDir(gebi(id), true); |
| 678 | @ } |
| 679 | @ } |
| 680 | @ |
| 681 | @ function belowSubdir(node){ |
| 682 | @ do{ |
| 683 | @ node = node.parentNode; |
| 684 | @ if( node==subdir ) return true; |
| 685 | @ } while( node && node!=outer_ul ); |
| 686 | @ return false; |
| 687 | @ } |
| 688 | @ |
| 689 | @ var history = window.history || {}; |
| 690 | @ if( !history.replaceState ) history.replaceState = function(){}; |
| 691 | @ var outer_ul = document.querySelector('.filetree > ul'); |
| 692 | @ var subdir = outer_ul.querySelector('.subdir'); |
| 693 | @ var expandMap = {}; |
| 694 | @ checkState(); |
| @@ -689,11 +697,11 @@ | |
| 697 | @ if( a.nodeName!='A' ) return true; |
| 698 | @ if( a.parentNode==subdir ){ |
| 699 | @ toggleAll(outer_ul); |
| 700 | @ return false; |
| 701 | @ } |
| 702 | @ if( !belowSubdir(a) ) return true; |
| 703 | @ var ul = a.nextSibling; |
| 704 | @ while( ul && ul.nodeName!='UL' ) ul = ul.nextSibling; |
| 705 | @ if( !ul ) return true; /* This is a file link, not a directory */ |
| 706 | @ toggleDir(ul); |
| 707 | @ return false; |
| 708 |
+10
-2
| --- src/browse.c | ||
| +++ src/browse.c | ||
| @@ -676,11 +676,19 @@ | ||
| 676 | 676 | @ for( var id in expandMap ){ |
| 677 | 677 | @ if( id!=='*' ) toggleDir(gebi(id), true); |
| 678 | 678 | @ } |
| 679 | 679 | @ } |
| 680 | 680 | @ |
| 681 | - @ /* No-op shim for IE9 */ | |
| 681 | + @ function belowSubdir(node){ | |
| 682 | + @ do{ | |
| 683 | + @ node = node.parentNode; | |
| 684 | + @ if( node==subdir ) return true; | |
| 685 | + @ } while( node && node!=outer_ul ); | |
| 686 | + @ return false; | |
| 687 | + @ } | |
| 688 | + @ | |
| 689 | + @ var history = window.history || {}; | |
| 682 | 690 | @ if( !history.replaceState ) history.replaceState = function(){}; |
| 683 | 691 | @ var outer_ul = document.querySelector('.filetree > ul'); |
| 684 | 692 | @ var subdir = outer_ul.querySelector('.subdir'); |
| 685 | 693 | @ var expandMap = {}; |
| 686 | 694 | @ checkState(); |
| @@ -689,11 +697,11 @@ | ||
| 689 | 697 | @ if( a.nodeName!='A' ) return true; |
| 690 | 698 | @ if( a.parentNode==subdir ){ |
| 691 | 699 | @ toggleAll(outer_ul); |
| 692 | 700 | @ return false; |
| 693 | 701 | @ } |
| 694 | - @ if( !subdir.contains(a) ) return true; | |
| 702 | + @ if( !belowSubdir(a) ) return true; | |
| 695 | 703 | @ var ul = a.nextSibling; |
| 696 | 704 | @ while( ul && ul.nodeName!='UL' ) ul = ul.nextSibling; |
| 697 | 705 | @ if( !ul ) return true; /* This is a file link, not a directory */ |
| 698 | 706 | @ toggleDir(ul); |
| 699 | 707 | @ return false; |
| 700 | 708 |
| --- src/browse.c | |
| +++ src/browse.c | |
| @@ -676,11 +676,19 @@ | |
| 676 | @ for( var id in expandMap ){ |
| 677 | @ if( id!=='*' ) toggleDir(gebi(id), true); |
| 678 | @ } |
| 679 | @ } |
| 680 | @ |
| 681 | @ /* No-op shim for IE9 */ |
| 682 | @ if( !history.replaceState ) history.replaceState = function(){}; |
| 683 | @ var outer_ul = document.querySelector('.filetree > ul'); |
| 684 | @ var subdir = outer_ul.querySelector('.subdir'); |
| 685 | @ var expandMap = {}; |
| 686 | @ checkState(); |
| @@ -689,11 +697,11 @@ | |
| 689 | @ if( a.nodeName!='A' ) return true; |
| 690 | @ if( a.parentNode==subdir ){ |
| 691 | @ toggleAll(outer_ul); |
| 692 | @ return false; |
| 693 | @ } |
| 694 | @ if( !subdir.contains(a) ) return true; |
| 695 | @ var ul = a.nextSibling; |
| 696 | @ while( ul && ul.nodeName!='UL' ) ul = ul.nextSibling; |
| 697 | @ if( !ul ) return true; /* This is a file link, not a directory */ |
| 698 | @ toggleDir(ul); |
| 699 | @ return false; |
| 700 |
| --- src/browse.c | |
| +++ src/browse.c | |
| @@ -676,11 +676,19 @@ | |
| 676 | @ for( var id in expandMap ){ |
| 677 | @ if( id!=='*' ) toggleDir(gebi(id), true); |
| 678 | @ } |
| 679 | @ } |
| 680 | @ |
| 681 | @ function belowSubdir(node){ |
| 682 | @ do{ |
| 683 | @ node = node.parentNode; |
| 684 | @ if( node==subdir ) return true; |
| 685 | @ } while( node && node!=outer_ul ); |
| 686 | @ return false; |
| 687 | @ } |
| 688 | @ |
| 689 | @ var history = window.history || {}; |
| 690 | @ if( !history.replaceState ) history.replaceState = function(){}; |
| 691 | @ var outer_ul = document.querySelector('.filetree > ul'); |
| 692 | @ var subdir = outer_ul.querySelector('.subdir'); |
| 693 | @ var expandMap = {}; |
| 694 | @ checkState(); |
| @@ -689,11 +697,11 @@ | |
| 697 | @ if( a.nodeName!='A' ) return true; |
| 698 | @ if( a.parentNode==subdir ){ |
| 699 | @ toggleAll(outer_ul); |
| 700 | @ return false; |
| 701 | @ } |
| 702 | @ if( !belowSubdir(a) ) return true; |
| 703 | @ var ul = a.nextSibling; |
| 704 | @ while( ul && ul.nodeName!='UL' ) ul = ul.nextSibling; |
| 705 | @ if( !ul ) return true; /* This is a file link, not a directory */ |
| 706 | @ toggleDir(ul); |
| 707 | @ return false; |
| 708 |