Fossil SCM
Timeline styling changes: (1) The td.timelineModernCell and td.timelineColumnarCell elements omit the id attribute when they are the current check-out or the selection. (2) Default CSS is changed to give a light-gray color to modern and columnar cells that are not current or selected and do not have a branch color. (3) The detail string in the verbose and compact views is now surrounded by parentheses.
Commit
99057f278c3afacd9590083d6e237cfce9cc396b988d1dd55df158766f26a834
Parent
ca1a1a750de8335…
2 files changed
+3
-1
+11
-3
+3
-1
| --- src/default_css.txt | ||
| +++ src/default_css.txt | ||
| @@ -75,12 +75,14 @@ | ||
| 75 | 75 | } |
| 76 | 76 | .timelineModernCell, .timelineColumnarCell, .timelineDetailCell { |
| 77 | 77 | vertical-align: top; |
| 78 | 78 | text-align: left; |
| 79 | 79 | padding: 0.75em; |
| 80 | - border: 1px #ccc solid; | |
| 81 | 80 | border-radius: 1em; |
| 81 | +} | |
| 82 | +.timelineModernCell[id], .timelineColumnarCell[id] { | |
| 83 | + background-color: #efefef; | |
| 82 | 84 | } |
| 83 | 85 | .timelineModernDetail { |
| 84 | 86 | font-size: 80%; |
| 85 | 87 | text-align: right; |
| 86 | 88 | float: right; |
| 87 | 89 |
| --- src/default_css.txt | |
| +++ src/default_css.txt | |
| @@ -75,12 +75,14 @@ | |
| 75 | } |
| 76 | .timelineModernCell, .timelineColumnarCell, .timelineDetailCell { |
| 77 | vertical-align: top; |
| 78 | text-align: left; |
| 79 | padding: 0.75em; |
| 80 | border: 1px #ccc solid; |
| 81 | border-radius: 1em; |
| 82 | } |
| 83 | .timelineModernDetail { |
| 84 | font-size: 80%; |
| 85 | text-align: right; |
| 86 | float: right; |
| 87 |
| --- src/default_css.txt | |
| +++ src/default_css.txt | |
| @@ -75,12 +75,14 @@ | |
| 75 | } |
| 76 | .timelineModernCell, .timelineColumnarCell, .timelineDetailCell { |
| 77 | vertical-align: top; |
| 78 | text-align: left; |
| 79 | padding: 0.75em; |
| 80 | border-radius: 1em; |
| 81 | } |
| 82 | .timelineModernCell[id], .timelineColumnarCell[id] { |
| 83 | background-color: #efefef; |
| 84 | } |
| 85 | .timelineModernDetail { |
| 86 | font-size: 80%; |
| 87 | text-align: right; |
| 88 | float: right; |
| 89 |
+11
-3
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -307,10 +307,11 @@ | ||
| 307 | 307 | int commentColumn = 3; /* Column containing comment text */ |
| 308 | 308 | int modPending; /* Pending moderation */ |
| 309 | 309 | char *zDateLink; /* URL for the link on the timestamp */ |
| 310 | 310 | int drawDetailEllipsis; /* True to show ellipsis in place of detail */ |
| 311 | 311 | int gidx = 0; /* Graph row identifier */ |
| 312 | + int isSelectedOrCurrent = 0; /* True if current row is selected */ | |
| 312 | 313 | char zTime[20]; |
| 313 | 314 | |
| 314 | 315 | if( zDate==0 ){ |
| 315 | 316 | zDate = "YYYY-MM-DD HH:MM:SS"; /* Something wrong with the repo */ |
| 316 | 317 | } |
| @@ -378,12 +379,14 @@ | ||
| 378 | 379 | zTime[0] = 0; |
| 379 | 380 | } |
| 380 | 381 | pendingEndTr = 1; |
| 381 | 382 | if( rid==selectedRid ){ |
| 382 | 383 | @ <tr class="timelineSelected"> |
| 384 | + isSelectedOrCurrent = 1; | |
| 383 | 385 | }else if( rid==vid ){ |
| 384 | 386 | @ <tr class="timelineCurrent"> |
| 387 | + isSelectedOrCurrent = 1; | |
| 385 | 388 | }else { |
| 386 | 389 | @ <tr> |
| 387 | 390 | } |
| 388 | 391 | if( zType[0]=='e' && tagid ){ |
| 389 | 392 | char *zId; |
| @@ -394,11 +397,10 @@ | ||
| 394 | 397 | }else if( zUuid ){ |
| 395 | 398 | zDateLink = chref("timelineHistLink", "%R/info/%!S", zUuid); |
| 396 | 399 | }else{ |
| 397 | 400 | zDateLink = mprintf("<a>"); |
| 398 | 401 | } |
| 399 | - /* WAS: zDateLink = href("%R/timeline?c=%!S&unhide", zUuid); */ | |
| 400 | 402 | @ <td class="timelineTime">%z(zDateLink)%s(zTime)</a></td> |
| 401 | 403 | @ <td class="timelineGraph"> |
| 402 | 404 | if( tmFlags & TIMELINE_UCOLOR ) zBgClr = zUser ? hash_color(zUser) : 0; |
| 403 | 405 | if( zType[0]=='c' |
| 404 | 406 | && (pGraph || zBgClr==0 || (tmFlags & TIMELINE_BRCOLOR)!=0) |
| @@ -436,11 +438,11 @@ | ||
| 436 | 438 | zUuid, isLeaf); |
| 437 | 439 | db_reset(&qbranch); |
| 438 | 440 | @ <div id="m%d(gidx)" class="tl-nodemark"></div> |
| 439 | 441 | } |
| 440 | 442 | @</td> |
| 441 | - if( zBgClr && zBgClr[0] && rid!=selectedRid ){ | |
| 443 | + if( !isSelectedOrCurrent ){ | |
| 442 | 444 | @ <td class="timeline%s(zStyle)Cell" id='mc%d(gidx)'> |
| 443 | 445 | }else{ |
| 444 | 446 | @ <td class="timeline%s(zStyle)Cell"> |
| 445 | 447 | } |
| 446 | 448 | if( pGraph && zType[0]!='c' ){ |
| @@ -531,20 +533,23 @@ | ||
| 531 | 533 | if( drawDetailEllipsis ){ |
| 532 | 534 | @ <span class='timelineEllipsis' id='ellipsis-%d(rid)'\ |
| 533 | 535 | @ data-id='%d(rid)'>...</span> |
| 534 | 536 | } |
| 535 | 537 | if( tmFlags & TIMELINE_COLUMNAR ){ |
| 536 | - if( zBgClr && zBgClr[0] && rid!=selectedRid ){ | |
| 538 | + if( !isSelectedOrCurrent ){ | |
| 537 | 539 | @ <td class="timelineDetailCell" id='md%d(gidx)'> |
| 538 | 540 | }else{ |
| 539 | 541 | @ <td class="timelineDetailCell"> |
| 540 | 542 | } |
| 541 | 543 | } |
| 542 | 544 | if( tmFlags & TIMELINE_COMPACT ){ |
| 543 | 545 | cgi_printf("<span class='clutter' id='detail-%d'>",rid); |
| 544 | 546 | } |
| 545 | 547 | cgi_printf("<span class='timeline%sDetail'>", zStyle); |
| 548 | + if( (tmFlags & (TIMELINE_VERBOSE|TIMELINE_COMPACT))!=0 ){ | |
| 549 | + cgi_printf("("); | |
| 550 | + } | |
| 546 | 551 | |
| 547 | 552 | if( (tmFlags & TIMELINE_VERBOSE)==0 ){ |
| 548 | 553 | if( zType[0]=='c' ){ |
| 549 | 554 | if( isLeaf ){ |
| 550 | 555 | if( db_exists("SELECT 1 FROM tagxref" |
| @@ -612,10 +617,13 @@ | ||
| 612 | 617 | tag_private_status(rid); |
| 613 | 618 | if( xExtra ){ |
| 614 | 619 | xExtra(rid); |
| 615 | 620 | } |
| 616 | 621 | /* End timelineDetail */ |
| 622 | + if( (tmFlags & (TIMELINE_VERBOSE|TIMELINE_COMPACT))!=0 ){ | |
| 623 | + cgi_printf(")"); | |
| 624 | + } | |
| 617 | 625 | if( tmFlags & TIMELINE_COMPACT ){ |
| 618 | 626 | @ </span></span> |
| 619 | 627 | }else{ |
| 620 | 628 | @ </span> |
| 621 | 629 | } |
| 622 | 630 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -307,10 +307,11 @@ | |
| 307 | int commentColumn = 3; /* Column containing comment text */ |
| 308 | int modPending; /* Pending moderation */ |
| 309 | char *zDateLink; /* URL for the link on the timestamp */ |
| 310 | int drawDetailEllipsis; /* True to show ellipsis in place of detail */ |
| 311 | int gidx = 0; /* Graph row identifier */ |
| 312 | char zTime[20]; |
| 313 | |
| 314 | if( zDate==0 ){ |
| 315 | zDate = "YYYY-MM-DD HH:MM:SS"; /* Something wrong with the repo */ |
| 316 | } |
| @@ -378,12 +379,14 @@ | |
| 378 | zTime[0] = 0; |
| 379 | } |
| 380 | pendingEndTr = 1; |
| 381 | if( rid==selectedRid ){ |
| 382 | @ <tr class="timelineSelected"> |
| 383 | }else if( rid==vid ){ |
| 384 | @ <tr class="timelineCurrent"> |
| 385 | }else { |
| 386 | @ <tr> |
| 387 | } |
| 388 | if( zType[0]=='e' && tagid ){ |
| 389 | char *zId; |
| @@ -394,11 +397,10 @@ | |
| 394 | }else if( zUuid ){ |
| 395 | zDateLink = chref("timelineHistLink", "%R/info/%!S", zUuid); |
| 396 | }else{ |
| 397 | zDateLink = mprintf("<a>"); |
| 398 | } |
| 399 | /* WAS: zDateLink = href("%R/timeline?c=%!S&unhide", zUuid); */ |
| 400 | @ <td class="timelineTime">%z(zDateLink)%s(zTime)</a></td> |
| 401 | @ <td class="timelineGraph"> |
| 402 | if( tmFlags & TIMELINE_UCOLOR ) zBgClr = zUser ? hash_color(zUser) : 0; |
| 403 | if( zType[0]=='c' |
| 404 | && (pGraph || zBgClr==0 || (tmFlags & TIMELINE_BRCOLOR)!=0) |
| @@ -436,11 +438,11 @@ | |
| 436 | zUuid, isLeaf); |
| 437 | db_reset(&qbranch); |
| 438 | @ <div id="m%d(gidx)" class="tl-nodemark"></div> |
| 439 | } |
| 440 | @</td> |
| 441 | if( zBgClr && zBgClr[0] && rid!=selectedRid ){ |
| 442 | @ <td class="timeline%s(zStyle)Cell" id='mc%d(gidx)'> |
| 443 | }else{ |
| 444 | @ <td class="timeline%s(zStyle)Cell"> |
| 445 | } |
| 446 | if( pGraph && zType[0]!='c' ){ |
| @@ -531,20 +533,23 @@ | |
| 531 | if( drawDetailEllipsis ){ |
| 532 | @ <span class='timelineEllipsis' id='ellipsis-%d(rid)'\ |
| 533 | @ data-id='%d(rid)'>...</span> |
| 534 | } |
| 535 | if( tmFlags & TIMELINE_COLUMNAR ){ |
| 536 | if( zBgClr && zBgClr[0] && rid!=selectedRid ){ |
| 537 | @ <td class="timelineDetailCell" id='md%d(gidx)'> |
| 538 | }else{ |
| 539 | @ <td class="timelineDetailCell"> |
| 540 | } |
| 541 | } |
| 542 | if( tmFlags & TIMELINE_COMPACT ){ |
| 543 | cgi_printf("<span class='clutter' id='detail-%d'>",rid); |
| 544 | } |
| 545 | cgi_printf("<span class='timeline%sDetail'>", zStyle); |
| 546 | |
| 547 | if( (tmFlags & TIMELINE_VERBOSE)==0 ){ |
| 548 | if( zType[0]=='c' ){ |
| 549 | if( isLeaf ){ |
| 550 | if( db_exists("SELECT 1 FROM tagxref" |
| @@ -612,10 +617,13 @@ | |
| 612 | tag_private_status(rid); |
| 613 | if( xExtra ){ |
| 614 | xExtra(rid); |
| 615 | } |
| 616 | /* End timelineDetail */ |
| 617 | if( tmFlags & TIMELINE_COMPACT ){ |
| 618 | @ </span></span> |
| 619 | }else{ |
| 620 | @ </span> |
| 621 | } |
| 622 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -307,10 +307,11 @@ | |
| 307 | int commentColumn = 3; /* Column containing comment text */ |
| 308 | int modPending; /* Pending moderation */ |
| 309 | char *zDateLink; /* URL for the link on the timestamp */ |
| 310 | int drawDetailEllipsis; /* True to show ellipsis in place of detail */ |
| 311 | int gidx = 0; /* Graph row identifier */ |
| 312 | int isSelectedOrCurrent = 0; /* True if current row is selected */ |
| 313 | char zTime[20]; |
| 314 | |
| 315 | if( zDate==0 ){ |
| 316 | zDate = "YYYY-MM-DD HH:MM:SS"; /* Something wrong with the repo */ |
| 317 | } |
| @@ -378,12 +379,14 @@ | |
| 379 | zTime[0] = 0; |
| 380 | } |
| 381 | pendingEndTr = 1; |
| 382 | if( rid==selectedRid ){ |
| 383 | @ <tr class="timelineSelected"> |
| 384 | isSelectedOrCurrent = 1; |
| 385 | }else if( rid==vid ){ |
| 386 | @ <tr class="timelineCurrent"> |
| 387 | isSelectedOrCurrent = 1; |
| 388 | }else { |
| 389 | @ <tr> |
| 390 | } |
| 391 | if( zType[0]=='e' && tagid ){ |
| 392 | char *zId; |
| @@ -394,11 +397,10 @@ | |
| 397 | }else if( zUuid ){ |
| 398 | zDateLink = chref("timelineHistLink", "%R/info/%!S", zUuid); |
| 399 | }else{ |
| 400 | zDateLink = mprintf("<a>"); |
| 401 | } |
| 402 | @ <td class="timelineTime">%z(zDateLink)%s(zTime)</a></td> |
| 403 | @ <td class="timelineGraph"> |
| 404 | if( tmFlags & TIMELINE_UCOLOR ) zBgClr = zUser ? hash_color(zUser) : 0; |
| 405 | if( zType[0]=='c' |
| 406 | && (pGraph || zBgClr==0 || (tmFlags & TIMELINE_BRCOLOR)!=0) |
| @@ -436,11 +438,11 @@ | |
| 438 | zUuid, isLeaf); |
| 439 | db_reset(&qbranch); |
| 440 | @ <div id="m%d(gidx)" class="tl-nodemark"></div> |
| 441 | } |
| 442 | @</td> |
| 443 | if( !isSelectedOrCurrent ){ |
| 444 | @ <td class="timeline%s(zStyle)Cell" id='mc%d(gidx)'> |
| 445 | }else{ |
| 446 | @ <td class="timeline%s(zStyle)Cell"> |
| 447 | } |
| 448 | if( pGraph && zType[0]!='c' ){ |
| @@ -531,20 +533,23 @@ | |
| 533 | if( drawDetailEllipsis ){ |
| 534 | @ <span class='timelineEllipsis' id='ellipsis-%d(rid)'\ |
| 535 | @ data-id='%d(rid)'>...</span> |
| 536 | } |
| 537 | if( tmFlags & TIMELINE_COLUMNAR ){ |
| 538 | if( !isSelectedOrCurrent ){ |
| 539 | @ <td class="timelineDetailCell" id='md%d(gidx)'> |
| 540 | }else{ |
| 541 | @ <td class="timelineDetailCell"> |
| 542 | } |
| 543 | } |
| 544 | if( tmFlags & TIMELINE_COMPACT ){ |
| 545 | cgi_printf("<span class='clutter' id='detail-%d'>",rid); |
| 546 | } |
| 547 | cgi_printf("<span class='timeline%sDetail'>", zStyle); |
| 548 | if( (tmFlags & (TIMELINE_VERBOSE|TIMELINE_COMPACT))!=0 ){ |
| 549 | cgi_printf("("); |
| 550 | } |
| 551 | |
| 552 | if( (tmFlags & TIMELINE_VERBOSE)==0 ){ |
| 553 | if( zType[0]=='c' ){ |
| 554 | if( isLeaf ){ |
| 555 | if( db_exists("SELECT 1 FROM tagxref" |
| @@ -612,10 +617,13 @@ | |
| 617 | tag_private_status(rid); |
| 618 | if( xExtra ){ |
| 619 | xExtra(rid); |
| 620 | } |
| 621 | /* End timelineDetail */ |
| 622 | if( (tmFlags & (TIMELINE_VERBOSE|TIMELINE_COMPACT))!=0 ){ |
| 623 | cgi_printf(")"); |
| 624 | } |
| 625 | if( tmFlags & TIMELINE_COMPACT ){ |
| 626 | @ </span></span> |
| 627 | }else{ |
| 628 | @ </span> |
| 629 | } |
| 630 |