Fossil SCM
Improve tree-view styling on IE8.
Commit
bfe7eeb71a01c29d25e5cc68daa7155ea2a360b0
Parent
de0ae9271f6f48e…
2 files changed
+7
-8
+2
-2
+7
-8
| --- src/browse.c | ||
| +++ src/browse.c | ||
| @@ -597,38 +597,37 @@ | ||
| 597 | 597 | ** The <li> element for directories also contains a sublist <ul> |
| 598 | 598 | ** for the contents of that directory. |
| 599 | 599 | */ |
| 600 | 600 | @ <div class="filetree"><ul> |
| 601 | 601 | if( nD ){ |
| 602 | - @ <li class="dir"> | |
| 602 | + @ <li class="dir last"> | |
| 603 | 603 | }else{ |
| 604 | - @ <li class="dir subdir"> | |
| 604 | + @ <li class="dir subdir last"> | |
| 605 | 605 | } |
| 606 | 606 | @ %z(href("%s",url_render(&sURI,"name",0,0,0)))%h(zProjectName)</a> |
| 607 | 607 | @ <ul> |
| 608 | 608 | for(p=sTree.pFirst, nDir=0; p; p=p->pNext){ |
| 609 | + const char *zLastClass = p->isLast ? " last" : ""; | |
| 609 | 610 | if( p->isDir ){ |
| 610 | - if( p->nFullName==nD-1 ){ | |
| 611 | - @ <li class="dir subdir"> | |
| 612 | - }else{ | |
| 613 | - @ <li class="dir"> | |
| 614 | - } | |
| 611 | + const char *zSubdirClass = p->nFullName==nD-1 ? " subdir" : ""; | |
| 612 | + @ <li class="dir%s(zSubdirClass)%s(zLastClass)"> | |
| 615 | 613 | @ %z(href("%s",url_render(&sURI,"name",p->zFullName,0,0)))%h(p->zName)</a> |
| 616 | 614 | if( startExpanded || p->nFullName<=nD ){ |
| 617 | 615 | @ <ul id="dir%d(nDir)"> |
| 618 | 616 | }else{ |
| 619 | 617 | @ <ul id="dir%d(nDir)" style='display:none;'> |
| 620 | 618 | } |
| 621 | 619 | nDir++; |
| 622 | 620 | }else if( !showDirOnly ){ |
| 621 | + char *zFileClass = fileext_class(p->zName); | |
| 623 | 622 | char *zLink; |
| 624 | 623 | if( zCI ){ |
| 625 | 624 | zLink = href("%R/artifact/%S",p->zUuid); |
| 626 | 625 | }else{ |
| 627 | 626 | zLink = href("%R/finfo?name=%T",p->zFullName); |
| 628 | 627 | } |
| 629 | - @ <li class="%z(fileext_class(p->zName))">%z(zLink)%h(p->zName)</a> | |
| 628 | + @ <li class="%z(zFileClass)%s(zLastClass)">%z(zLink)%h(p->zName)</a> | |
| 630 | 629 | } |
| 631 | 630 | if( p->isLast ){ |
| 632 | 631 | int nClose = p->iLevel - (p->pNext ? p->pNext->iLevel : 0); |
| 633 | 632 | while( nClose-- > 0 ){ |
| 634 | 633 | @ </ul> |
| 635 | 634 |
| --- src/browse.c | |
| +++ src/browse.c | |
| @@ -597,38 +597,37 @@ | |
| 597 | ** The <li> element for directories also contains a sublist <ul> |
| 598 | ** for the contents of that directory. |
| 599 | */ |
| 600 | @ <div class="filetree"><ul> |
| 601 | if( nD ){ |
| 602 | @ <li class="dir"> |
| 603 | }else{ |
| 604 | @ <li class="dir subdir"> |
| 605 | } |
| 606 | @ %z(href("%s",url_render(&sURI,"name",0,0,0)))%h(zProjectName)</a> |
| 607 | @ <ul> |
| 608 | for(p=sTree.pFirst, nDir=0; p; p=p->pNext){ |
| 609 | if( p->isDir ){ |
| 610 | if( p->nFullName==nD-1 ){ |
| 611 | @ <li class="dir subdir"> |
| 612 | }else{ |
| 613 | @ <li class="dir"> |
| 614 | } |
| 615 | @ %z(href("%s",url_render(&sURI,"name",p->zFullName,0,0)))%h(p->zName)</a> |
| 616 | if( startExpanded || p->nFullName<=nD ){ |
| 617 | @ <ul id="dir%d(nDir)"> |
| 618 | }else{ |
| 619 | @ <ul id="dir%d(nDir)" style='display:none;'> |
| 620 | } |
| 621 | nDir++; |
| 622 | }else if( !showDirOnly ){ |
| 623 | char *zLink; |
| 624 | if( zCI ){ |
| 625 | zLink = href("%R/artifact/%S",p->zUuid); |
| 626 | }else{ |
| 627 | zLink = href("%R/finfo?name=%T",p->zFullName); |
| 628 | } |
| 629 | @ <li class="%z(fileext_class(p->zName))">%z(zLink)%h(p->zName)</a> |
| 630 | } |
| 631 | if( p->isLast ){ |
| 632 | int nClose = p->iLevel - (p->pNext ? p->pNext->iLevel : 0); |
| 633 | while( nClose-- > 0 ){ |
| 634 | @ </ul> |
| 635 |
| --- src/browse.c | |
| +++ src/browse.c | |
| @@ -597,38 +597,37 @@ | |
| 597 | ** The <li> element for directories also contains a sublist <ul> |
| 598 | ** for the contents of that directory. |
| 599 | */ |
| 600 | @ <div class="filetree"><ul> |
| 601 | if( nD ){ |
| 602 | @ <li class="dir last"> |
| 603 | }else{ |
| 604 | @ <li class="dir subdir last"> |
| 605 | } |
| 606 | @ %z(href("%s",url_render(&sURI,"name",0,0,0)))%h(zProjectName)</a> |
| 607 | @ <ul> |
| 608 | for(p=sTree.pFirst, nDir=0; p; p=p->pNext){ |
| 609 | const char *zLastClass = p->isLast ? " last" : ""; |
| 610 | if( p->isDir ){ |
| 611 | const char *zSubdirClass = p->nFullName==nD-1 ? " subdir" : ""; |
| 612 | @ <li class="dir%s(zSubdirClass)%s(zLastClass)"> |
| 613 | @ %z(href("%s",url_render(&sURI,"name",p->zFullName,0,0)))%h(p->zName)</a> |
| 614 | if( startExpanded || p->nFullName<=nD ){ |
| 615 | @ <ul id="dir%d(nDir)"> |
| 616 | }else{ |
| 617 | @ <ul id="dir%d(nDir)" style='display:none;'> |
| 618 | } |
| 619 | nDir++; |
| 620 | }else if( !showDirOnly ){ |
| 621 | char *zFileClass = fileext_class(p->zName); |
| 622 | char *zLink; |
| 623 | if( zCI ){ |
| 624 | zLink = href("%R/artifact/%S",p->zUuid); |
| 625 | }else{ |
| 626 | zLink = href("%R/finfo?name=%T",p->zFullName); |
| 627 | } |
| 628 | @ <li class="%z(zFileClass)%s(zLastClass)">%z(zLink)%h(p->zName)</a> |
| 629 | } |
| 630 | if( p->isLast ){ |
| 631 | int nClose = p->iLevel - (p->pNext ? p->pNext->iLevel : 0); |
| 632 | while( nClose-- > 0 ){ |
| 633 | @ </ul> |
| 634 |
+2
-2
| --- src/style.c | ||
| +++ src/style.c | ||
| @@ -802,20 +802,20 @@ | ||
| 802 | 802 | @ width: 14px; |
| 803 | 803 | @ height: 1.5em; |
| 804 | 804 | @ border-left: 2px solid #aaa; |
| 805 | 805 | @ border-bottom: 2px solid #aaa; |
| 806 | 806 | }, |
| 807 | - { ".filetree ul ul:before", | |
| 807 | + { ".filetree li > ul:before", | |
| 808 | 808 | "tree-view directory lines", |
| 809 | 809 | @ content: ''; |
| 810 | 810 | @ position: absolute; |
| 811 | 811 | @ top: -1.5em; |
| 812 | 812 | @ bottom: 0; |
| 813 | 813 | @ left: -35px; |
| 814 | 814 | @ border-left: 2px solid #aaa; |
| 815 | 815 | }, |
| 816 | - { ".filetree li:last-child > ul:before", | |
| 816 | + { ".filetree li.last > ul:before", | |
| 817 | 817 | "hide lines for last-child directories", |
| 818 | 818 | @ display: none; |
| 819 | 819 | }, |
| 820 | 820 | { ".filetree a", |
| 821 | 821 | "tree-view links", |
| 822 | 822 |
| --- src/style.c | |
| +++ src/style.c | |
| @@ -802,20 +802,20 @@ | |
| 802 | @ width: 14px; |
| 803 | @ height: 1.5em; |
| 804 | @ border-left: 2px solid #aaa; |
| 805 | @ border-bottom: 2px solid #aaa; |
| 806 | }, |
| 807 | { ".filetree ul ul:before", |
| 808 | "tree-view directory lines", |
| 809 | @ content: ''; |
| 810 | @ position: absolute; |
| 811 | @ top: -1.5em; |
| 812 | @ bottom: 0; |
| 813 | @ left: -35px; |
| 814 | @ border-left: 2px solid #aaa; |
| 815 | }, |
| 816 | { ".filetree li:last-child > ul:before", |
| 817 | "hide lines for last-child directories", |
| 818 | @ display: none; |
| 819 | }, |
| 820 | { ".filetree a", |
| 821 | "tree-view links", |
| 822 |
| --- src/style.c | |
| +++ src/style.c | |
| @@ -802,20 +802,20 @@ | |
| 802 | @ width: 14px; |
| 803 | @ height: 1.5em; |
| 804 | @ border-left: 2px solid #aaa; |
| 805 | @ border-bottom: 2px solid #aaa; |
| 806 | }, |
| 807 | { ".filetree li > ul:before", |
| 808 | "tree-view directory lines", |
| 809 | @ content: ''; |
| 810 | @ position: absolute; |
| 811 | @ top: -1.5em; |
| 812 | @ bottom: 0; |
| 813 | @ left: -35px; |
| 814 | @ border-left: 2px solid #aaa; |
| 815 | }, |
| 816 | { ".filetree li.last > ul:before", |
| 817 | "hide lines for last-child directories", |
| 818 | @ display: none; |
| 819 | }, |
| 820 | { ".filetree a", |
| 821 | "tree-view links", |
| 822 |