Fossil SCM

Flatten the subdirectory ancestor links into a single line.

joel 2014-01-05 00:40 UTC csstree
Commit 7dfc5cda7ae6127dc5212be47677a1cb0fe54b05
2 files changed +7 -2 +22 -3
+7 -2
--- src/browse.c
+++ src/browse.c
@@ -545,21 +545,26 @@
545545
546546
/* Generate a multi-column table listing the contents of zD[]
547547
** directory.
548548
*/
549549
@ <ul class="filetree root">
550
- @ <li class="dir">
551550
if( nD ){
552551
char *zLink = href("%s", url_render(&sURI, "name", 0, 0, 0));
552
+ @ <li class="dir">
553553
@ %z(zLink)%h(zProjectName)</a>
554554
}else{
555
+ @ <li class="dir subdir">
555556
@ <a>%h(zProjectName)</a>
556557
}
557558
@ <ul class="filetree">
558559
for(p=sTree.pFirst; p; p=p->pNext){
559560
if( p->isDir ){
560
- @ <li class="dir">
561
+ if( nD && strlen(p->zFullName)==nD-1 ){
562
+ @ <li class="dir subdir">
563
+ }else{
564
+ @ <li class="dir">
565
+ }
561566
if( fossil_strcmp(p->zFullName, zD)==0 ){
562567
@ <a>%h(p->zName)</a>
563568
}else{
564569
char *zLink = href("%s", url_render(&sURI, "name", p->zFullName, 0, 0));
565570
@ %z(zLink)%h(p->zName)</a>
566571
--- src/browse.c
+++ src/browse.c
@@ -545,21 +545,26 @@
545
546 /* Generate a multi-column table listing the contents of zD[]
547 ** directory.
548 */
549 @ <ul class="filetree root">
550 @ <li class="dir">
551 if( nD ){
552 char *zLink = href("%s", url_render(&sURI, "name", 0, 0, 0));
 
553 @ %z(zLink)%h(zProjectName)</a>
554 }else{
 
555 @ <a>%h(zProjectName)</a>
556 }
557 @ <ul class="filetree">
558 for(p=sTree.pFirst; p; p=p->pNext){
559 if( p->isDir ){
560 @ <li class="dir">
 
 
 
 
561 if( fossil_strcmp(p->zFullName, zD)==0 ){
562 @ <a>%h(p->zName)</a>
563 }else{
564 char *zLink = href("%s", url_render(&sURI, "name", p->zFullName, 0, 0));
565 @ %z(zLink)%h(p->zName)</a>
566
--- src/browse.c
+++ src/browse.c
@@ -545,21 +545,26 @@
545
546 /* Generate a multi-column table listing the contents of zD[]
547 ** directory.
548 */
549 @ <ul class="filetree root">
 
550 if( nD ){
551 char *zLink = href("%s", url_render(&sURI, "name", 0, 0, 0));
552 @ <li class="dir">
553 @ %z(zLink)%h(zProjectName)</a>
554 }else{
555 @ <li class="dir subdir">
556 @ <a>%h(zProjectName)</a>
557 }
558 @ <ul class="filetree">
559 for(p=sTree.pFirst; p; p=p->pNext){
560 if( p->isDir ){
561 if( nD && strlen(p->zFullName)==nD-1 ){
562 @ <li class="dir subdir">
563 }else{
564 @ <li class="dir">
565 }
566 if( fossil_strcmp(p->zFullName, zD)==0 ){
567 @ <a>%h(p->zName)</a>
568 }else{
569 char *zLink = href("%s", url_render(&sURI, "name", p->zFullName, 0, 0));
570 @ %z(zLink)%h(p->zName)</a>
571
+22 -3
--- src/style.c
+++ src/style.c
@@ -772,20 +772,39 @@
772772
@ margin-left: 0.5em;
773773
@ padding-left: 0.5em;
774774
@ white-space: nowrap;
775775
},
776776
{ ".filetree",
777
- "file tree",
777
+ "file tree root and branch lists",
778
+ @ display: inline;
778779
@ padding: 0;
780
+ },
781
+ { ".filetree.root",
782
+ "file tree root",
783
+ @ display: block;
779784
@ list-style: none;
780785
@ line-height: 1.3;
781786
},
782
- { ".filetree ul",
783
- "file tree subdirectory lists",
787
+ { ".filetree li",
788
+ "file tree list items",
789
+ @ display: inline;
790
+ },
791
+ { ".filetree .subdir ul",
792
+ "file tree lists below subdir",
793
+ @ display: block;
784794
@ margin: 0 0 .4em 7px;
785795
@ padding: .2em 0 0 12px;
786796
@ border-left: 2px dotted #aaa;
797
+ },
798
+ { ".filetree .subdir li",
799
+ "file tree lists items below subdir",
800
+ @ display: block;
801
+ @ padding: 0;
802
+ },
803
+ { ".filetree a",
804
+ "file tree links",
805
+ @ margin-right: .5em;
787806
},
788807
{ ".filetree a:before",
789808
"file tree link icons",
790809
@ margin-right: 5px;
791810
@ vertical-align: -3px;
792811
--- src/style.c
+++ src/style.c
@@ -772,20 +772,39 @@
772 @ margin-left: 0.5em;
773 @ padding-left: 0.5em;
774 @ white-space: nowrap;
775 },
776 { ".filetree",
777 "file tree",
 
778 @ padding: 0;
 
 
 
 
779 @ list-style: none;
780 @ line-height: 1.3;
781 },
782 { ".filetree ul",
783 "file tree subdirectory lists",
 
 
 
 
 
784 @ margin: 0 0 .4em 7px;
785 @ padding: .2em 0 0 12px;
786 @ border-left: 2px dotted #aaa;
 
 
 
 
 
 
 
 
 
787 },
788 { ".filetree a:before",
789 "file tree link icons",
790 @ margin-right: 5px;
791 @ vertical-align: -3px;
792
--- src/style.c
+++ src/style.c
@@ -772,20 +772,39 @@
772 @ margin-left: 0.5em;
773 @ padding-left: 0.5em;
774 @ white-space: nowrap;
775 },
776 { ".filetree",
777 "file tree root and branch lists",
778 @ display: inline;
779 @ padding: 0;
780 },
781 { ".filetree.root",
782 "file tree root",
783 @ display: block;
784 @ list-style: none;
785 @ line-height: 1.3;
786 },
787 { ".filetree li",
788 "file tree list items",
789 @ display: inline;
790 },
791 { ".filetree .subdir ul",
792 "file tree lists below subdir",
793 @ display: block;
794 @ margin: 0 0 .4em 7px;
795 @ padding: .2em 0 0 12px;
796 @ border-left: 2px dotted #aaa;
797 },
798 { ".filetree .subdir li",
799 "file tree lists items below subdir",
800 @ display: block;
801 @ padding: 0;
802 },
803 { ".filetree a",
804 "file tree links",
805 @ margin-right: .5em;
806 },
807 { ".filetree a:before",
808 "file tree link icons",
809 @ margin-right: 5px;
810 @ vertical-align: -3px;
811

Keyboard Shortcuts

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