Fossil SCM

Clicking anywhere on the comment field of a /timeline toggles the (detail) on/off. The ellipsis is no longer a hyperlink.

drh 2017-11-26 01:25 UTC declutter-via-js
Commit 83bb8a867482d4f2e4aeb002222ba63adce607e03adfdd3b624b06622093c476
2 files changed +5 -3 +18 -9
+5 -3
--- src/finfo.c
+++ src/finfo.c
@@ -521,17 +521,19 @@
521521
@ <td class="timelineTableCell">
522522
}
523523
if( bHashBeforeComment && zUuid ){
524524
hyperlink_to_uuid(zUuid);
525525
}
526
- @ <span class="timelineComment timelineCheckinComment">%W(zCom)</span>
526
+ @ <span class="timelineComment timelineCheckinComment" \
527
+ @ onclick='toggleEllipsis(%d(frid))'>
528
+ @ %W(zCom)</span>
527529
if( bHashAfterComment && zUuid ){
528530
hyperlink_to_uuid(zUuid);
529531
}
530532
if( bShowDetail ){
531
- @ <a class='timelineEllipsis anticlutter' id='ellipsis-%d(frid)' \
532
- @ onclick='expandEllipsis(%d(frid))'>&bull;&bull;&bull;</a>
533
+ @ <span class='timelineEllipsis anticlutter' id='ellipsis-%d(frid)' \
534
+ @ onclick='expandEllipsis(%d(frid))'>&bull;&bull;&bull;</span>
533535
if( bSeparateDetail ){
534536
if( zBgClr && zBgClr[0] ){
535537
@ <td class="timelineTableCell timelineDetailCell"
536538
@ style="background-color: %h(zBgClr);">
537539
}else{
538540
--- src/finfo.c
+++ src/finfo.c
@@ -521,17 +521,19 @@
521 @ <td class="timelineTableCell">
522 }
523 if( bHashBeforeComment && zUuid ){
524 hyperlink_to_uuid(zUuid);
525 }
526 @ <span class="timelineComment timelineCheckinComment">%W(zCom)</span>
 
 
527 if( bHashAfterComment && zUuid ){
528 hyperlink_to_uuid(zUuid);
529 }
530 if( bShowDetail ){
531 @ <a class='timelineEllipsis anticlutter' id='ellipsis-%d(frid)' \
532 @ onclick='expandEllipsis(%d(frid))'>&bull;&bull;&bull;</a>
533 if( bSeparateDetail ){
534 if( zBgClr && zBgClr[0] ){
535 @ <td class="timelineTableCell timelineDetailCell"
536 @ style="background-color: %h(zBgClr);">
537 }else{
538
--- src/finfo.c
+++ src/finfo.c
@@ -521,17 +521,19 @@
521 @ <td class="timelineTableCell">
522 }
523 if( bHashBeforeComment && zUuid ){
524 hyperlink_to_uuid(zUuid);
525 }
526 @ <span class="timelineComment timelineCheckinComment" \
527 @ onclick='toggleEllipsis(%d(frid))'>
528 @ %W(zCom)</span>
529 if( bHashAfterComment && zUuid ){
530 hyperlink_to_uuid(zUuid);
531 }
532 if( bShowDetail ){
533 @ <span class='timelineEllipsis anticlutter' id='ellipsis-%d(frid)' \
534 @ onclick='expandEllipsis(%d(frid))'>&bull;&bull;&bull;</span>
535 if( bSeparateDetail ){
536 if( zBgClr && zBgClr[0] ){
537 @ <td class="timelineTableCell timelineDetailCell"
538 @ style="background-color: %h(zBgClr);">
539 }else{
540
+18 -9
--- src/timeline.c
+++ src/timeline.c
@@ -490,15 +490,16 @@
490490
}
491491
db_column_blob(pQuery, commentColumn, &comment);
492492
if( zType[0]!='c' ){
493493
/* Comments for anything other than a check-in are generated by
494494
** "fossil rebuild" and expect to be rendered as text/x-fossil-wiki */
495
- @ <span class='timelineComment'>
495
+ @ <span class='timelineComment' onclick='toggleEllipsis(%d(rid))'>
496496
wiki_convert(&comment, 0, WIKI_INLINE);
497497
@ </span>
498498
}else{
499
- @ <span class='timelineComment timelineCheckinComment'>
499
+ @ <span class='timelineComment timelineCheckinComment' \
500
+ @ onclick='toggleEllipsis(%d(rid))'>
500501
if( bCommentGitStyle ){
501502
/* Truncate comment at first blank line */
502503
int ii, jj;
503504
int n = blob_size(&comment);
504505
char *z = blob_str(&comment);
@@ -554,12 +555,12 @@
554555
555556
/* Generate extra information and hyperlinks to follow the comment.
556557
** Example: "(check-in: [abcdefg], user: drh, tags: trunk)"
557558
*/
558559
if( bShowDetail ){
559
- @ <a class='timelineEllipsis anticlutter' id='ellipsis-%d(rid)' \
560
- @ onclick='expandEllipsis(%d(rid))'>&bull;&bull;&bull;</a>
560
+ @ <span class='timelineEllipsis anticlutter' id='ellipsis-%d(rid)' \
561
+ @ onclick='expandEllipsis(%d(rid))'>&bull;&bull;&bull;</span>
561562
if( bSeparateDetail ){
562563
if( zBgClr && zBgClr[0] && rid!=selectedRid ){
563564
@ <td class="timelineTableCell timelineDetailCell"
564565
@ style="background-color: %h(zBgClr);">
565566
}else{
@@ -1157,15 +1158,23 @@
11571158
@ function reclutter(){
11581159
@ changeDisplay('clutter','inline');
11591160
@ changeDisplay('anticlutter','none');
11601161
@ checkHeight();
11611162
@ }
1162
- @ function expandEllipsis(id){
1163
- @ gebi("ellipsis-"+id).style.display='none';
1164
- @ gebi("detail-"+id).style.display='inline';
1165
- @ var x = gebi("links-"+id);
1166
- @ if(x) x.style.display='inline';
1163
+ @ function toggleEllipsis(id){
1164
+ @ var x = gebi("ellipsis-"+id);
1165
+ @ if( x.style.display=='none' ){
1166
+ @ x.style.display='inline';
1167
+ @ gebi("detail-"+id).style.display='none';
1168
+ @ x = gebi("links-"+id);
1169
+ @ if(x) x.style.display='none';
1170
+ @ }else{
1171
+ @ x.style.display='none';
1172
+ @ gebi("detail-"+id).style.display='inline';
1173
+ @ x = gebi("links-"+id);
1174
+ @ if(x) x.style.display='inline';
1175
+ @ }
11671176
@ checkHeight();
11681177
@ }
11691178
@ var lastRow = gebi("m"+rowinfo[rowinfo.length-1].id);
11701179
@ var lastY = 0;
11711180
@ function checkHeight(){
11721181
--- src/timeline.c
+++ src/timeline.c
@@ -490,15 +490,16 @@
490 }
491 db_column_blob(pQuery, commentColumn, &comment);
492 if( zType[0]!='c' ){
493 /* Comments for anything other than a check-in are generated by
494 ** "fossil rebuild" and expect to be rendered as text/x-fossil-wiki */
495 @ <span class='timelineComment'>
496 wiki_convert(&comment, 0, WIKI_INLINE);
497 @ </span>
498 }else{
499 @ <span class='timelineComment timelineCheckinComment'>
 
500 if( bCommentGitStyle ){
501 /* Truncate comment at first blank line */
502 int ii, jj;
503 int n = blob_size(&comment);
504 char *z = blob_str(&comment);
@@ -554,12 +555,12 @@
554
555 /* Generate extra information and hyperlinks to follow the comment.
556 ** Example: "(check-in: [abcdefg], user: drh, tags: trunk)"
557 */
558 if( bShowDetail ){
559 @ <a class='timelineEllipsis anticlutter' id='ellipsis-%d(rid)' \
560 @ onclick='expandEllipsis(%d(rid))'>&bull;&bull;&bull;</a>
561 if( bSeparateDetail ){
562 if( zBgClr && zBgClr[0] && rid!=selectedRid ){
563 @ <td class="timelineTableCell timelineDetailCell"
564 @ style="background-color: %h(zBgClr);">
565 }else{
@@ -1157,15 +1158,23 @@
1157 @ function reclutter(){
1158 @ changeDisplay('clutter','inline');
1159 @ changeDisplay('anticlutter','none');
1160 @ checkHeight();
1161 @ }
1162 @ function expandEllipsis(id){
1163 @ gebi("ellipsis-"+id).style.display='none';
1164 @ gebi("detail-"+id).style.display='inline';
1165 @ var x = gebi("links-"+id);
1166 @ if(x) x.style.display='inline';
 
 
 
 
 
 
 
 
1167 @ checkHeight();
1168 @ }
1169 @ var lastRow = gebi("m"+rowinfo[rowinfo.length-1].id);
1170 @ var lastY = 0;
1171 @ function checkHeight(){
1172
--- src/timeline.c
+++ src/timeline.c
@@ -490,15 +490,16 @@
490 }
491 db_column_blob(pQuery, commentColumn, &comment);
492 if( zType[0]!='c' ){
493 /* Comments for anything other than a check-in are generated by
494 ** "fossil rebuild" and expect to be rendered as text/x-fossil-wiki */
495 @ <span class='timelineComment' onclick='toggleEllipsis(%d(rid))'>
496 wiki_convert(&comment, 0, WIKI_INLINE);
497 @ </span>
498 }else{
499 @ <span class='timelineComment timelineCheckinComment' \
500 @ onclick='toggleEllipsis(%d(rid))'>
501 if( bCommentGitStyle ){
502 /* Truncate comment at first blank line */
503 int ii, jj;
504 int n = blob_size(&comment);
505 char *z = blob_str(&comment);
@@ -554,12 +555,12 @@
555
556 /* Generate extra information and hyperlinks to follow the comment.
557 ** Example: "(check-in: [abcdefg], user: drh, tags: trunk)"
558 */
559 if( bShowDetail ){
560 @ <span class='timelineEllipsis anticlutter' id='ellipsis-%d(rid)' \
561 @ onclick='expandEllipsis(%d(rid))'>&bull;&bull;&bull;</span>
562 if( bSeparateDetail ){
563 if( zBgClr && zBgClr[0] && rid!=selectedRid ){
564 @ <td class="timelineTableCell timelineDetailCell"
565 @ style="background-color: %h(zBgClr);">
566 }else{
@@ -1157,15 +1158,23 @@
1158 @ function reclutter(){
1159 @ changeDisplay('clutter','inline');
1160 @ changeDisplay('anticlutter','none');
1161 @ checkHeight();
1162 @ }
1163 @ function toggleEllipsis(id){
1164 @ var x = gebi("ellipsis-"+id);
1165 @ if( x.style.display=='none' ){
1166 @ x.style.display='inline';
1167 @ gebi("detail-"+id).style.display='none';
1168 @ x = gebi("links-"+id);
1169 @ if(x) x.style.display='none';
1170 @ }else{
1171 @ x.style.display='none';
1172 @ gebi("detail-"+id).style.display='inline';
1173 @ x = gebi("links-"+id);
1174 @ if(x) x.style.display='inline';
1175 @ }
1176 @ checkHeight();
1177 @ }
1178 @ var lastRow = gebi("m"+rowinfo[rowinfo.length-1].id);
1179 @ var lastY = 0;
1180 @ function checkHeight(){
1181

Keyboard Shortcuts

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