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.

drh 2017-12-11 23:51 trunk
Commit 99057f278c3afacd9590083d6e237cfce9cc396b988d1dd55df158766f26a834
2 files changed +3 -1 +11 -3
--- src/default_css.txt
+++ src/default_css.txt
@@ -75,12 +75,14 @@
7575
}
7676
.timelineModernCell, .timelineColumnarCell, .timelineDetailCell {
7777
vertical-align: top;
7878
text-align: left;
7979
padding: 0.75em;
80
- border: 1px #ccc solid;
8180
border-radius: 1em;
81
+}
82
+.timelineModernCell[id], .timelineColumnarCell[id] {
83
+ background-color: #efefef;
8284
}
8385
.timelineModernDetail {
8486
font-size: 80%;
8587
text-align: right;
8688
float: right;
8789
--- 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 @@
307307
int commentColumn = 3; /* Column containing comment text */
308308
int modPending; /* Pending moderation */
309309
char *zDateLink; /* URL for the link on the timestamp */
310310
int drawDetailEllipsis; /* True to show ellipsis in place of detail */
311311
int gidx = 0; /* Graph row identifier */
312
+ int isSelectedOrCurrent = 0; /* True if current row is selected */
312313
char zTime[20];
313314
314315
if( zDate==0 ){
315316
zDate = "YYYY-MM-DD HH:MM:SS"; /* Something wrong with the repo */
316317
}
@@ -378,12 +379,14 @@
378379
zTime[0] = 0;
379380
}
380381
pendingEndTr = 1;
381382
if( rid==selectedRid ){
382383
@ <tr class="timelineSelected">
384
+ isSelectedOrCurrent = 1;
383385
}else if( rid==vid ){
384386
@ <tr class="timelineCurrent">
387
+ isSelectedOrCurrent = 1;
385388
}else {
386389
@ <tr>
387390
}
388391
if( zType[0]=='e' && tagid ){
389392
char *zId;
@@ -394,11 +397,10 @@
394397
}else if( zUuid ){
395398
zDateLink = chref("timelineHistLink", "%R/info/%!S", zUuid);
396399
}else{
397400
zDateLink = mprintf("<a>");
398401
}
399
- /* WAS: zDateLink = href("%R/timeline?c=%!S&unhide", zUuid); */
400402
@ <td class="timelineTime">%z(zDateLink)%s(zTime)</a></td>
401403
@ <td class="timelineGraph">
402404
if( tmFlags & TIMELINE_UCOLOR ) zBgClr = zUser ? hash_color(zUser) : 0;
403405
if( zType[0]=='c'
404406
&& (pGraph || zBgClr==0 || (tmFlags & TIMELINE_BRCOLOR)!=0)
@@ -436,11 +438,11 @@
436438
zUuid, isLeaf);
437439
db_reset(&qbranch);
438440
@ <div id="m%d(gidx)" class="tl-nodemark"></div>
439441
}
440442
@</td>
441
- if( zBgClr && zBgClr[0] && rid!=selectedRid ){
443
+ if( !isSelectedOrCurrent ){
442444
@ <td class="timeline%s(zStyle)Cell" id='mc%d(gidx)'>
443445
}else{
444446
@ <td class="timeline%s(zStyle)Cell">
445447
}
446448
if( pGraph && zType[0]!='c' ){
@@ -531,20 +533,23 @@
531533
if( drawDetailEllipsis ){
532534
@ <span class='timelineEllipsis' id='ellipsis-%d(rid)'\
533535
@ data-id='%d(rid)'>...</span>
534536
}
535537
if( tmFlags & TIMELINE_COLUMNAR ){
536
- if( zBgClr && zBgClr[0] && rid!=selectedRid ){
538
+ if( !isSelectedOrCurrent ){
537539
@ <td class="timelineDetailCell" id='md%d(gidx)'>
538540
}else{
539541
@ <td class="timelineDetailCell">
540542
}
541543
}
542544
if( tmFlags & TIMELINE_COMPACT ){
543545
cgi_printf("<span class='clutter' id='detail-%d'>",rid);
544546
}
545547
cgi_printf("<span class='timeline%sDetail'>", zStyle);
548
+ if( (tmFlags & (TIMELINE_VERBOSE|TIMELINE_COMPACT))!=0 ){
549
+ cgi_printf("(");
550
+ }
546551
547552
if( (tmFlags & TIMELINE_VERBOSE)==0 ){
548553
if( zType[0]=='c' ){
549554
if( isLeaf ){
550555
if( db_exists("SELECT 1 FROM tagxref"
@@ -612,10 +617,13 @@
612617
tag_private_status(rid);
613618
if( xExtra ){
614619
xExtra(rid);
615620
}
616621
/* End timelineDetail */
622
+ if( (tmFlags & (TIMELINE_VERBOSE|TIMELINE_COMPACT))!=0 ){
623
+ cgi_printf(")");
624
+ }
617625
if( tmFlags & TIMELINE_COMPACT ){
618626
@ </span></span>
619627
}else{
620628
@ </span>
621629
}
622630
--- 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

Keyboard Shortcuts

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