Fossil SCM
Clicking anywhere on the comment field of a /timeline toggles the (detail) on/off. The ellipsis is no longer a hyperlink.
Commit
83bb8a867482d4f2e4aeb002222ba63adce607e03adfdd3b624b06622093c476
Parent
9b739d1d93be52f…
2 files changed
+5
-3
+18
-9
+5
-3
| --- src/finfo.c | ||
| +++ src/finfo.c | ||
| @@ -521,17 +521,19 @@ | ||
| 521 | 521 | @ <td class="timelineTableCell"> |
| 522 | 522 | } |
| 523 | 523 | if( bHashBeforeComment && zUuid ){ |
| 524 | 524 | hyperlink_to_uuid(zUuid); |
| 525 | 525 | } |
| 526 | - @ <span class="timelineComment timelineCheckinComment">%W(zCom)</span> | |
| 526 | + @ <span class="timelineComment timelineCheckinComment" \ | |
| 527 | + @ onclick='toggleEllipsis(%d(frid))'> | |
| 528 | + @ %W(zCom)</span> | |
| 527 | 529 | if( bHashAfterComment && zUuid ){ |
| 528 | 530 | hyperlink_to_uuid(zUuid); |
| 529 | 531 | } |
| 530 | 532 | if( bShowDetail ){ |
| 531 | - @ <a class='timelineEllipsis anticlutter' id='ellipsis-%d(frid)' \ | |
| 532 | - @ onclick='expandEllipsis(%d(frid))'>•••</a> | |
| 533 | + @ <span class='timelineEllipsis anticlutter' id='ellipsis-%d(frid)' \ | |
| 534 | + @ onclick='expandEllipsis(%d(frid))'>•••</span> | |
| 533 | 535 | if( bSeparateDetail ){ |
| 534 | 536 | if( zBgClr && zBgClr[0] ){ |
| 535 | 537 | @ <td class="timelineTableCell timelineDetailCell" |
| 536 | 538 | @ style="background-color: %h(zBgClr);"> |
| 537 | 539 | }else{ |
| 538 | 540 |
| --- 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))'>•••</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))'>•••</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 @@ | ||
| 490 | 490 | } |
| 491 | 491 | db_column_blob(pQuery, commentColumn, &comment); |
| 492 | 492 | if( zType[0]!='c' ){ |
| 493 | 493 | /* Comments for anything other than a check-in are generated by |
| 494 | 494 | ** "fossil rebuild" and expect to be rendered as text/x-fossil-wiki */ |
| 495 | - @ <span class='timelineComment'> | |
| 495 | + @ <span class='timelineComment' onclick='toggleEllipsis(%d(rid))'> | |
| 496 | 496 | wiki_convert(&comment, 0, WIKI_INLINE); |
| 497 | 497 | @ </span> |
| 498 | 498 | }else{ |
| 499 | - @ <span class='timelineComment timelineCheckinComment'> | |
| 499 | + @ <span class='timelineComment timelineCheckinComment' \ | |
| 500 | + @ onclick='toggleEllipsis(%d(rid))'> | |
| 500 | 501 | if( bCommentGitStyle ){ |
| 501 | 502 | /* Truncate comment at first blank line */ |
| 502 | 503 | int ii, jj; |
| 503 | 504 | int n = blob_size(&comment); |
| 504 | 505 | char *z = blob_str(&comment); |
| @@ -554,12 +555,12 @@ | ||
| 554 | 555 | |
| 555 | 556 | /* Generate extra information and hyperlinks to follow the comment. |
| 556 | 557 | ** Example: "(check-in: [abcdefg], user: drh, tags: trunk)" |
| 557 | 558 | */ |
| 558 | 559 | if( bShowDetail ){ |
| 559 | - @ <a class='timelineEllipsis anticlutter' id='ellipsis-%d(rid)' \ | |
| 560 | - @ onclick='expandEllipsis(%d(rid))'>•••</a> | |
| 560 | + @ <span class='timelineEllipsis anticlutter' id='ellipsis-%d(rid)' \ | |
| 561 | + @ onclick='expandEllipsis(%d(rid))'>•••</span> | |
| 561 | 562 | if( bSeparateDetail ){ |
| 562 | 563 | if( zBgClr && zBgClr[0] && rid!=selectedRid ){ |
| 563 | 564 | @ <td class="timelineTableCell timelineDetailCell" |
| 564 | 565 | @ style="background-color: %h(zBgClr);"> |
| 565 | 566 | }else{ |
| @@ -1157,15 +1158,23 @@ | ||
| 1157 | 1158 | @ function reclutter(){ |
| 1158 | 1159 | @ changeDisplay('clutter','inline'); |
| 1159 | 1160 | @ changeDisplay('anticlutter','none'); |
| 1160 | 1161 | @ checkHeight(); |
| 1161 | 1162 | @ } |
| 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 | + @ } | |
| 1167 | 1176 | @ checkHeight(); |
| 1168 | 1177 | @ } |
| 1169 | 1178 | @ var lastRow = gebi("m"+rowinfo[rowinfo.length-1].id); |
| 1170 | 1179 | @ var lastY = 0; |
| 1171 | 1180 | @ function checkHeight(){ |
| 1172 | 1181 |
| --- 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))'>•••</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))'>•••</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 |