Fossil SCM

Timeline fixes: (1) Show the artifact-id for tickets, wiki, and tags in the detail section for Verbose and Compact Mode. (2) Fix the graph.js script so that it sets ellipsis callbacks even if there are not graph elements.

drh 2018-01-24 17:00 trunk
Commit 0ac1895c7f067bb676a1f3d9c67580031eab7786070b53dbcb1f0fe464799c73
2 files changed +18 -13 +3 -1
+18 -13
--- src/graph.js
+++ src/graph.js
@@ -342,22 +342,27 @@
342342
var h = window.innerHeight;
343343
var y = absoluteY(x[0]) - h/2;
344344
if( y>0 ) window.scrollTo(0, y);
345345
}
346346
}
347
- var lastRow = document.getElementById("m"+tx.rowinfo[tx.rowinfo.length-1].id);
348
- var lastY = 0;
349
- function checkHeight(){
350
- var h = absoluteY(lastRow);
351
- if( h!=lastY ){
352
- renderGraph();
353
- lastY = h;
354
- }
355
- setTimeout(checkHeight, 1000);
356
- }
357
- initGraph();
358
- checkHeight();
347
+ if( tx.rowinfo ){
348
+ var lastRow =
349
+ document.getElementById("m"+tx.rowinfo[tx.rowinfo.length-1].id);
350
+ var lastY = 0;
351
+ function checkHeight(){
352
+ var h = absoluteY(lastRow);
353
+ if( h!=lastY ){
354
+ renderGraph();
355
+ lastY = h;
356
+ }
357
+ setTimeout(checkHeight, 1000);
358
+ }
359
+ initGraph();
360
+ checkHeight();
361
+ }else{
362
+ function checkHeight(){}
363
+ }
359364
if( tx.scrollToSelect ){
360365
scrollToSelected();
361366
}
362367
363368
/* Set the onclick= attributes for elements of the "Compact" display
@@ -382,8 +387,8 @@
382387
for(i=0; 1; i++){
383388
var dataObj = document.getElementById("timeline-data-"+i);
384389
if(!dataObj) break;
385390
var txJson = dataObj.textContent || dataObj.innerText;
386391
var tx = JSON.parse(txJson);
387
- if(tx.rowinfo) TimelineGraph(tx);
392
+ TimelineGraph(tx);
388393
}
389394
}())
390395
--- src/graph.js
+++ src/graph.js
@@ -342,22 +342,27 @@
342 var h = window.innerHeight;
343 var y = absoluteY(x[0]) - h/2;
344 if( y>0 ) window.scrollTo(0, y);
345 }
346 }
347 var lastRow = document.getElementById("m"+tx.rowinfo[tx.rowinfo.length-1].id);
348 var lastY = 0;
349 function checkHeight(){
350 var h = absoluteY(lastRow);
351 if( h!=lastY ){
352 renderGraph();
353 lastY = h;
354 }
355 setTimeout(checkHeight, 1000);
356 }
357 initGraph();
358 checkHeight();
 
 
 
 
 
359 if( tx.scrollToSelect ){
360 scrollToSelected();
361 }
362
363 /* Set the onclick= attributes for elements of the "Compact" display
@@ -382,8 +387,8 @@
382 for(i=0; 1; i++){
383 var dataObj = document.getElementById("timeline-data-"+i);
384 if(!dataObj) break;
385 var txJson = dataObj.textContent || dataObj.innerText;
386 var tx = JSON.parse(txJson);
387 if(tx.rowinfo) TimelineGraph(tx);
388 }
389 }())
390
--- src/graph.js
+++ src/graph.js
@@ -342,22 +342,27 @@
342 var h = window.innerHeight;
343 var y = absoluteY(x[0]) - h/2;
344 if( y>0 ) window.scrollTo(0, y);
345 }
346 }
347 if( tx.rowinfo ){
348 var lastRow =
349 document.getElementById("m"+tx.rowinfo[tx.rowinfo.length-1].id);
350 var lastY = 0;
351 function checkHeight(){
352 var h = absoluteY(lastRow);
353 if( h!=lastY ){
354 renderGraph();
355 lastY = h;
356 }
357 setTimeout(checkHeight, 1000);
358 }
359 initGraph();
360 checkHeight();
361 }else{
362 function checkHeight(){}
363 }
364 if( tx.scrollToSelect ){
365 scrollToSelected();
366 }
367
368 /* Set the onclick= attributes for elements of the "Compact" display
@@ -382,8 +387,8 @@
387 for(i=0; 1; i++){
388 var dataObj = document.getElementById("timeline-data-"+i);
389 if(!dataObj) break;
390 var txJson = dataObj.textContent || dataObj.innerText;
391 var tx = JSON.parse(txJson);
392 TimelineGraph(tx);
393 }
394 }())
395
+3 -1
--- src/timeline.c
+++ src/timeline.c
@@ -529,11 +529,11 @@
529529
530530
/* Generate extra information and hyperlinks to follow the comment.
531531
** Example: "(check-in: [abcdefg], user: drh, tags: trunk)"
532532
*/
533533
if( drawDetailEllipsis ){
534
- @ <span class='timelineEllipsis' id='ellipsis-%d(rid)'\
534
+ @ <span class='timelineEllipsis' id='ellipsis-%d(rid)' \
535535
@ data-id='%d(rid)'>...</span>
536536
}
537537
if( tmFlags & TIMELINE_COLUMNAR ){
538538
if( !isSelectedOrCurrent ){
539539
@ <td class="timelineDetailCell" id='md%d(gidx)'>
@@ -565,10 +565,12 @@
565565
cgi_printf("technote:&nbsp;");
566566
hyperlink_to_event_tagid(tagid<0?-tagid:tagid);
567567
}else{
568568
cgi_printf("artifact:&nbsp;%z%S</a> ",href("%R/info/%!S",zUuid),zUuid);
569569
}
570
+ }else if( zType[0]=='g' || zType[0]=='w' || zType[0]=='t' ){
571
+ cgi_printf("artifact:&nbsp;%z%S</a> ",href("%R/info/%!S",zUuid),zUuid);
570572
}
571573
572574
if( g.perm.Hyperlink && fossil_strcmp(zDispUser, zThisUser)!=0 ){
573575
char *zLink = mprintf("%R/timeline?u=%h&c=%t&nd&n=200", zDispUser, zDate);
574576
cgi_printf("user:&nbsp;%z%h</a>", href("%z",zLink), zDispUser);
575577
--- src/timeline.c
+++ src/timeline.c
@@ -529,11 +529,11 @@
529
530 /* Generate extra information and hyperlinks to follow the comment.
531 ** Example: "(check-in: [abcdefg], user: drh, tags: trunk)"
532 */
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)'>
@@ -565,10 +565,12 @@
565 cgi_printf("technote:&nbsp;");
566 hyperlink_to_event_tagid(tagid<0?-tagid:tagid);
567 }else{
568 cgi_printf("artifact:&nbsp;%z%S</a> ",href("%R/info/%!S",zUuid),zUuid);
569 }
 
 
570 }
571
572 if( g.perm.Hyperlink && fossil_strcmp(zDispUser, zThisUser)!=0 ){
573 char *zLink = mprintf("%R/timeline?u=%h&c=%t&nd&n=200", zDispUser, zDate);
574 cgi_printf("user:&nbsp;%z%h</a>", href("%z",zLink), zDispUser);
575
--- src/timeline.c
+++ src/timeline.c
@@ -529,11 +529,11 @@
529
530 /* Generate extra information and hyperlinks to follow the comment.
531 ** Example: "(check-in: [abcdefg], user: drh, tags: trunk)"
532 */
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)'>
@@ -565,10 +565,12 @@
565 cgi_printf("technote:&nbsp;");
566 hyperlink_to_event_tagid(tagid<0?-tagid:tagid);
567 }else{
568 cgi_printf("artifact:&nbsp;%z%S</a> ",href("%R/info/%!S",zUuid),zUuid);
569 }
570 }else if( zType[0]=='g' || zType[0]=='w' || zType[0]=='t' ){
571 cgi_printf("artifact:&nbsp;%z%S</a> ",href("%R/info/%!S",zUuid),zUuid);
572 }
573
574 if( g.perm.Hyperlink && fossil_strcmp(zDispUser, zThisUser)!=0 ){
575 char *zLink = mprintf("%R/timeline?u=%h&c=%t&nd&n=200", zDispUser, zDate);
576 cgi_printf("user:&nbsp;%z%h</a>", href("%z",zLink), zDispUser);
577

Keyboard Shortcuts

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