Fossil SCM

Further fixes for tree-view in ancient versions of Firefox.

drh 2014-01-16 21:59 trunk merge
Commit f69dbc361c8fc7a45e9c2fa3026c57a475a62f3c
2 files changed +10 -2 +10 -2
+10 -2
--- src/browse.c
+++ src/browse.c
@@ -676,11 +676,19 @@
676676
@ for( var id in expandMap ){
677677
@ if( id!=='*' ) toggleDir(gebi(id), true);
678678
@ }
679679
@ }
680680
@
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 || {};
682690
@ if( !history.replaceState ) history.replaceState = function(){};
683691
@ var outer_ul = document.querySelector('.filetree > ul');
684692
@ var subdir = outer_ul.querySelector('.subdir');
685693
@ var expandMap = {};
686694
@ checkState();
@@ -689,11 +697,11 @@
689697
@ if( a.nodeName!='A' ) return true;
690698
@ if( a.parentNode==subdir ){
691699
@ toggleAll(outer_ul);
692700
@ return false;
693701
@ }
694
- @ if( !subdir.contains(a) ) return true;
702
+ @ if( !belowSubdir(a) ) return true;
695703
@ var ul = a.nextSibling;
696704
@ while( ul && ul.nodeName!='UL' ) ul = ul.nextSibling;
697705
@ if( !ul ) return true; /* This is a file link, not a directory */
698706
@ toggleDir(ul);
699707
@ return false;
700708
--- 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 @@
676676
@ for( var id in expandMap ){
677677
@ if( id!=='*' ) toggleDir(gebi(id), true);
678678
@ }
679679
@ }
680680
@
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 || {};
682690
@ if( !history.replaceState ) history.replaceState = function(){};
683691
@ var outer_ul = document.querySelector('.filetree > ul');
684692
@ var subdir = outer_ul.querySelector('.subdir');
685693
@ var expandMap = {};
686694
@ checkState();
@@ -689,11 +697,11 @@
689697
@ if( a.nodeName!='A' ) return true;
690698
@ if( a.parentNode==subdir ){
691699
@ toggleAll(outer_ul);
692700
@ return false;
693701
@ }
694
- @ if( !subdir.contains(a) ) return true;
702
+ @ if( !belowSubdir(a) ) return true;
695703
@ var ul = a.nextSibling;
696704
@ while( ul && ul.nodeName!='UL' ) ul = ul.nextSibling;
697705
@ if( !ul ) return true; /* This is a file link, not a directory */
698706
@ toggleDir(ul);
699707
@ return false;
700708
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button