Fossil

Check-in [6eaad787]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add the javascript Advanced/Basic buttons to the /finfo timeline.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | declutter-via-js
Files: files | file ages | folders
SHA3-256: 6eaad787a8379d2a909581b9034f7dc16d2d7ac8063c3f98ffd432de04114d4c
User & Date: drh 2017-11-25 21:21:57
Context
2017-11-26
00:37
For the ellipses in timelines from three bullet characters. check-in: cef3d63c user: drh tags: declutter-via-js
2017-11-25
21:21
Add the javascript Advanced/Basic buttons to the /finfo timeline. check-in: 6eaad787 user: drh tags: declutter-via-js
20:43
On the /timeline page, begin with the "basic" view. Provide an "Advanced" button to fill in details using JS. The "basic" query parameter no longer functions. check-in: 3ede2d87 user: drh tags: declutter-via-js
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to skins/black_and_white/header.txt.

12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
     }
  </th1></div>
</div>
<div class="mainmenu">
<th1>
html "<a href='$home$index_page'>Home</a>\n"
if {[anycap jor]} {
  html "<a href='$home/timeline?basic'>Timeline</a>\n"
}
if {[anoncap oh]} {
  html "<a href='$home/tree?ci=tip'>Files</a>\n"
}
if {[anoncap o]} {
  html "<a href='$home/brlist'>Branches</a>\n"
  html "<a href='$home/taglist'>Tags</a>\n"







|







12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
     }
  </th1></div>
</div>
<div class="mainmenu">
<th1>
html "<a href='$home$index_page'>Home</a>\n"
if {[anycap jor]} {
  html "<a href='$home/timeline'>Timeline</a>\n"
}
if {[anoncap oh]} {
  html "<a href='$home/tree?ci=tip'>Files</a>\n"
}
if {[anoncap o]} {
  html "<a href='$home/brlist'>Branches</a>\n"
  html "<a href='$home/taglist'>Tags</a>\n"

Changes to skins/blitz/header.txt.

35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
  } else {
    html "<li>"
  }
  html "<a href='$home$url'>$name</a></li>\n"
}
menulink $index_page Home
if {[anycap jor]} {
  menulink /timeline?basic Timeline
}
if {[hascap oh]} {
  menulink /dir?ci=tip Files
}
if {[hascap o]} {
  menulink  /brlist Branches
  menulink  /taglist Tags







|







35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
  } else {
    html "<li>"
  }
  html "<a href='$home$url'>$name</a></li>\n"
}
menulink $index_page Home
if {[anycap jor]} {
  menulink /timeline Timeline
}
if {[hascap oh]} {
  menulink /dir?ci=tip Files
}
if {[hascap o]} {
  menulink  /brlist Branches
  menulink  /taglist Tags

Changes to skins/blitz_no_logo/header.txt.

32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
  } else {
    html "<li>"
  }
  html "<a href='$home$url'>$name</a></li>\n"
}
menulink $index_page Home
if {[anycap jor]} {
  menulink /timeline?basic Timeline
}
if {[hascap oh]} {
  menulink /dir?ci=tip Files
}
if {[hascap o]} {
  menulink  /brlist Branches
  menulink  /taglist Tags







|







32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
  } else {
    html "<li>"
  }
  html "<a href='$home$url'>$name</a></li>\n"
}
menulink $index_page Home
if {[anycap jor]} {
  menulink /timeline Timeline
}
if {[hascap oh]} {
  menulink /dir?ci=tip Files
}
if {[hascap o]} {
  menulink  /brlist Branches
  menulink  /taglist Tags

Changes to skins/bootstrap/header.txt.

52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
                    html "<li class='active'><a href='$home/wiki'>Wiki</a></li>\n"
                  } else {
                    html "<li><a href='$home/wiki'>Wiki</a></li>\n"
                  }
                }
                if {[anycap jor]} {
                  if {[string compare $current_page "timeline"] == 0} {
                    html "<li class='active'><a href='$home/timeline?basic'>Timeline</a></li>\n"
                  } else {
                    html "<li><a href='$home/timeline?basic'>Timeline</a></li>\n"
                  }
                }
                if {[hascap oh]} {
                  if {[string compare [string range $current_page 0 2] "dir"] == 0} {
                    html "<li class='active'><a href='$home/dir?ci=tip'>Files</a></li>\n"
                  } else {
                    html "<li><a href='$home/dir?ci=tip'>Files</a></li>\n"







|

|







52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
                    html "<li class='active'><a href='$home/wiki'>Wiki</a></li>\n"
                  } else {
                    html "<li><a href='$home/wiki'>Wiki</a></li>\n"
                  }
                }
                if {[anycap jor]} {
                  if {[string compare $current_page "timeline"] == 0} {
                    html "<li class='active'><a href='$home/timeline'>Timeline</a></li>\n"
                  } else {
                    html "<li><a href='$home/timeline'>Timeline</a></li>\n"
                  }
                }
                if {[hascap oh]} {
                  if {[string compare [string range $current_page 0 2] "dir"] == 0} {
                    html "<li class='active'><a href='$home/dir?ci=tip'>Files</a></li>\n"
                  } else {
                    html "<li><a href='$home/dir?ci=tip'>Files</a></li>\n"

Changes to skins/default/header.txt.

17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
    html "<a href='$home$url' class='active'>$name</a>\n"
  } else {
    html "<a href='$home$url'>$name</a>\n"
  }
}
menulink $index_page Home
if {[anycap jor]} {
  menulink /timeline?basic Timeline
}
if {[hascap oh]} {
  menulink /dir?ci=tip Files
}
if {[hascap o]} {
  menulink  /brlist Branches
  menulink  /taglist Tags







|







17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
    html "<a href='$home$url' class='active'>$name</a>\n"
  } else {
    html "<a href='$home$url'>$name</a>\n"
  }
}
menulink $index_page Home
if {[anycap jor]} {
  menulink /timeline Timeline
}
if {[hascap oh]} {
  menulink /dir?ci=tip Files
}
if {[hascap o]} {
  menulink  /brlist Branches
  menulink  /taglist Tags

Changes to skins/eagle/header.txt.

96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
proc menulink {url name} {
  upvar home home
  html "<a href='$home$url'>$name</a>\n"
}
menulink $index_page Home
menulink /help Help
if {[anycap jor]} {
  menulink /timeline?basic Timeline
}
if {[anoncap oh]} {
  menulink /dir?ci=tip Files
}
if {[anoncap o]} {
  menulink /brlist Branches
  menulink /taglist Tags







|







96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
proc menulink {url name} {
  upvar home home
  html "<a href='$home$url'>$name</a>\n"
}
menulink $index_page Home
menulink /help Help
if {[anycap jor]} {
  menulink /timeline Timeline
}
if {[anoncap oh]} {
  menulink /dir?ci=tip Files
}
if {[anoncap o]} {
  menulink /brlist Branches
  menulink /taglist Tags

Changes to skins/enhanced1/header.txt.

96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
proc menulink {url name} {
  upvar home home
  html "<a href='$home$url'>$name</a>\n"
}
menulink $index_page Home
menulink /help Help
if {[anycap jor]} {
  menulink /timeline?basic Timeline
}
if {[anoncap oh]} {
  menulink /dir?ci=tip Files
}
if {[anoncap o]} {
  menulink /brlist Branches
  menulink /taglist Tags







|







96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
proc menulink {url name} {
  upvar home home
  html "<a href='$home$url'>$name</a>\n"
}
menulink $index_page Home
menulink /help Help
if {[anycap jor]} {
  menulink /timeline Timeline
}
if {[anoncap oh]} {
  menulink /dir?ci=tip Files
}
if {[anoncap o]} {
  menulink /brlist Branches
  menulink /taglist Tags

Changes to skins/khaki/header.txt.

10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
     }
  </th1></div>
</div>
<div class="mainmenu">
<th1>
html "<a href='$home$index_page'>Home</a>\n"
if {[anycap jor]} {
  html "<a href='$home/timeline?basic'>Timeline</a>\n"
}
if {[anoncap oh]} {
  html "<a href='$home/tree?ci=tip'>Files</a>\n"
}
if {[anoncap o]} {
  html "<a href='$home/brlist'>Branches</a>\n"
  html "<a href='$home/taglist'>Tags</a>\n"







|







10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
     }
  </th1></div>
</div>
<div class="mainmenu">
<th1>
html "<a href='$home$index_page'>Home</a>\n"
if {[anycap jor]} {
  html "<a href='$home/timeline'>Timeline</a>\n"
}
if {[anoncap oh]} {
  html "<a href='$home/tree?ci=tip'>Files</a>\n"
}
if {[anoncap o]} {
  html "<a href='$home/brlist'>Branches</a>\n"
  html "<a href='$home/taglist'>Tags</a>\n"

Changes to skins/original/header.txt.

11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
     }
  </th1></div>
</div>
<div class="mainmenu">
<th1>
html "<a href='$home$index_page'>Home</a>\n"
if {[anycap jor]} {
  html "<a href='$home/timeline?basic'>Timeline</a>\n"
}
if {[anoncap oh]} {
  html "<a href='$home/tree?ci=tip'>Files</a>\n"
}
if {[anoncap o]} {
  html "<a href='$home/brlist'>Branches</a>\n"
  html "<a href='$home/taglist'>Tags</a>\n"







|







11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
     }
  </th1></div>
</div>
<div class="mainmenu">
<th1>
html "<a href='$home$index_page'>Home</a>\n"
if {[anycap jor]} {
  html "<a href='$home/timeline'>Timeline</a>\n"
}
if {[anoncap oh]} {
  html "<a href='$home/tree?ci=tip'>Files</a>\n"
}
if {[anoncap o]} {
  html "<a href='$home/brlist'>Branches</a>\n"
  html "<a href='$home/taglist'>Tags</a>\n"

Changes to skins/plain_gray/header.txt.

8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
     }
  </th1></div>
</div>
<div class="mainmenu">
<th1>
html "<a href='$home$index_page'>Home</a>\n"
if {[anycap jor]} {
  html "<a href='$home/timeline?basic'>Timeline</a>\n"
}
if {[anoncap oh]} {
  html "<a href='$home/tree?ci=tip'>Files</a>\n"
}
if {[anoncap o]} {
  html "<a href='$home/brlist'>Branches</a>\n"
  html "<a href='$home/taglist'>Tags</a>\n"







|







8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
     }
  </th1></div>
</div>
<div class="mainmenu">
<th1>
html "<a href='$home$index_page'>Home</a>\n"
if {[anycap jor]} {
  html "<a href='$home/timeline'>Timeline</a>\n"
}
if {[anoncap oh]} {
  html "<a href='$home/tree?ci=tip'>Files</a>\n"
}
if {[anoncap o]} {
  html "<a href='$home/brlist'>Branches</a>\n"
  html "<a href='$home/taglist'>Tags</a>\n"

Changes to skins/rounded1/header.txt.

12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
     }
  </th1></div>
</div>
<div class="mainmenu">
<th1>
html "<a href='$home$index_page'>Home</a>\n"
if {[anycap jor]} {
  html "<a href='$home/timeline?basic'>Timeline</a>\n"
}
if {[anoncap oh]} {
  html "<a href='$home/tree?ci=tip'>Files</a>\n"
}
if {[anoncap o]} {
  html "<a href='$home/brlist'>Branches</a>\n"
  html "<a href='$home/taglist'>Tags</a>\n"







|







12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
     }
  </th1></div>
</div>
<div class="mainmenu">
<th1>
html "<a href='$home$index_page'>Home</a>\n"
if {[anycap jor]} {
  html "<a href='$home/timeline'>Timeline</a>\n"
}
if {[anoncap oh]} {
  html "<a href='$home/tree?ci=tip'>Files</a>\n"
}
if {[anoncap o]} {
  html "<a href='$home/brlist'>Branches</a>\n"
  html "<a href='$home/taglist'>Tags</a>\n"

Changes to skins/xekri/header.txt.

100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    html "<a href='$home$url' class='active'>$name</a>\n"
  } else {
    html "<a href='$home$url'>$name</a>\n"
  }
}
menulink $index_page Home
if {[anycap jor]} {
  menulink /timeline?basic Timeline
}
if {[anoncap oh]} {
  menulink /dir?ci=tip Files
}
if {[anoncap o]} {
  menulink  /brlist Branches
  menulink  /taglist Tags







|







100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
    html "<a href='$home$url' class='active'>$name</a>\n"
  } else {
    html "<a href='$home$url'>$name</a>\n"
  }
}
menulink $index_page Home
if {[anycap jor]} {
  menulink /timeline Timeline
}
if {[anoncap oh]} {
  menulink /dir?ci=tip Files
}
if {[anoncap o]} {
  menulink  /brlist Branches
  menulink  /taglist Tags

Changes to src/finfo.c.

285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
...
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
...
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
...
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
...
531
532
533
534
535
536
537


538
539
540
541
542
543
544
545

546
547
548
549
550
551
552
...
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
...
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
**    n=NUM      Show the first NUM changes only
**    brbg       Background color by branch name
**    ubg        Background color by user name
**    ci=UUID    Ancestors of a particular check-in
**    orig=UUID  If both ci and orig are supplied, only show those
**                 changes on a direct path from orig to ci.
**    showid     Show RID values for debugging
**    basic      Minimize clutter and complication
**
** DATETIME may be "now" or "YYYY-MM-DDTHH:MM:SS.SSS". If in
** year-month-day form, it may be truncated, and it may also name a
** timezone offset from UTC as "-HH:MM" (westward) or "+HH:MM"
** (eastward). Either no timezone suffix or "Z" means UTC.
*/
void finfo_page(void){
................................................................................
  GraphContext *pGraph;
  int brBg = P("brbg")!=0;
  int uBg = P("ubg")!=0;
  int fDebug = atoi(PD("debug","0"));
  int fShowId = P("showid")!=0;
  Stmt qparent;
  int iTableId = timeline_tableid();
  int bBasic = PB("basic");
  int bHashBeforeComment = 0; /* Show hash before the comment */
  int bHashAfterComment = 0;  /* Show hash after the comment */
  int bHashInDetail = 0;      /* Show the hash inside the detail section */
  int bShowDetail;            /* Show the detail section */
  int bSeparateDetail;        /* Detail section in a separate column */
  int eCommentFormat;         /* value for timeline-comment-format */

................................................................................
  login_anonymous_available();
  url_initialize(&url, "finfo");
  if( brBg ) url_add_parameter(&url, "brbg", 0);
  if( uBg ) url_add_parameter(&url, "ubg", 0);
  baseCheckin = name_to_rid_www("ci");
  zPrevDate[0] = 0;
  zFilename = PD("name","");
  eCommentFormat = bBasic ? 5 : db_get_int("timeline-comment-format", 0);
  bShowDetail = (eCommentFormat & 1)==0;  /* Bit 0 suppresses the comment */
  bSeparateDetail = (eCommentFormat & 8)!=0; 
  switch( (eCommentFormat>>1)&3 ){
    case 1:  bHashAfterComment = 1;  break;
    case 2:  bHashInDetail = 1;      break;
    default: bHashBeforeComment = 1; break;
  }
  fnid = db_int(0, "SELECT fnid FROM filename WHERE name=%Q", zFilename);
  if( fnid==0 ){
    @ No such file: %h(zFilename)
    style_footer();
    return;
  }
  if( g.perm.Admin && !bBasic ){
    style_submenu_element("MLink Table", "%R/mlink?name=%t", zFilename);
  }
  if( baseCheckin ){
    if( P("orig")!=0 ){
      origCheckin = name_to_typed_rid(P("orig"),"ci");
      path_shortest_stored_in_ancestor_table(origCheckin, baseCheckin);
    }else{
................................................................................
      fossil_free(zUuid);
    }
  }else{
    blob_appendf(&title, "History of ");
    hyperlinked_path(zFilename, &title, 0, "tree", "");
    if( fShowId ) blob_appendf(&title, " (%d)", fnid);
  }
  if( bBasic ){
    style_submenu_element("Details", "%s",
            url_render(&url, "basic", 0, 0, 0));
  }else{
    style_submenu_element("Declutter", "%s",
            url_render(&url, "basic", "1", 0, 0));
  }
  @ <h2>%b(&title)</h2>
  blob_reset(&title);
  pGraph = graph_init();
  @ <table id="timelineTable%d(iTableId)" class="timelineTable">
  if( baseCheckin ){
    db_prepare(&qparent,
      "SELECT DISTINCT pid FROM mlink"
................................................................................
      hyperlink_to_uuid(zUuid);
    }
    @ <span class="timelineComment timelineCheckinComment">%W(zCom)</span>
    if( bHashAfterComment && zUuid ){
      hyperlink_to_uuid(zUuid);
    }
    if( bShowDetail ){


      if( bSeparateDetail ){
        if( zBgClr && zBgClr[0] ){
          @ <td class="timelineTableCell timelineDetailCell"
          @  style="background-color: %h(zBgClr);">
        }else{
          @ <td class="timelineTableCell timelineDetailCell">
        }
      }

      cgi_printf("<span class='timelineDetail timelineCheckinDetail'>(");
      if( zUuid && bHashInDetail ){
        @ file: %z(href("%R/artifact/%!S",zUuid))[%S(zUuid)]</a>
        if( fShowId ){
          int srcId = delta_source_rid(frid);
          if( srcId>0 ){
            @ id: %d(frid)&larr;%d(srcId)
................................................................................
          @ %z(href("%R/finfo?name=%t",zNewName))%h(zNewName)</a>
          fossil_free(zNewName);
        }else{
          @ <b>Deleted</b>
        }
      }
    }
    if( g.perm.Hyperlink && zUuid && !bBasic ){
      const char *z = zFilename;
      @ <span class='timelineExtraLinks'>
      @ %z(href("%R/annotate?filename=%h&checkin=%s",z,zCkin))
      @ [annotate]</a>
      @ %z(href("%R/blame?filename=%h&checkin=%s",z,zCkin))
      @ [blame]</a>
      @ %z(href("%R/timeline?n=all&uf=%!S",zUuid))[check-ins&nbsp;using]</a>
      if( fpid>0 ){
        @ %z(href("%R/fdiff?sbs=1&v1=%!S&v2=%!S",zPUuid,zUuid))[diff]</a>
      }
      @ </span>
    }
    if( fDebug & FINFO_DEBUG_MLINK ){
      int ii;
      char *zAncLink;
      @ <br />fid=%d(frid) pid=%d(fpid) mid=%d(fmid)
      if( nParent>0 ){
        @ parents=%d(aParent[0])
................................................................................
        }
      }
      zAncLink = href("%R/finfo?name=%T&ci=%!S&debug=1",zFilename,zCkin);
      @ %z(zAncLink)[ancestry]</a>
    }
    tag_private_status(frid);
    if( bShowDetail ){
      @ </span>
    }
    @ </td></tr>
  }
  db_finalize(&q);
  db_finalize(&qparent);
  if( pGraph ){
    graph_finish(pGraph, 1);







<







 







<







 







|













|







 







|
|
<
<
<
<
<







 







>
>








>







 







|

|








|







 







|







285
286
287
288
289
290
291

292
293
294
295
296
297
298
...
311
312
313
314
315
316
317

318
319
320
321
322
323
324
...
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
...
443
444
445
446
447
448
449
450
451





452
453
454
455
456
457
458
...
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
...
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
...
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
**    n=NUM      Show the first NUM changes only
**    brbg       Background color by branch name
**    ubg        Background color by user name
**    ci=UUID    Ancestors of a particular check-in
**    orig=UUID  If both ci and orig are supplied, only show those
**                 changes on a direct path from orig to ci.
**    showid     Show RID values for debugging

**
** DATETIME may be "now" or "YYYY-MM-DDTHH:MM:SS.SSS". If in
** year-month-day form, it may be truncated, and it may also name a
** timezone offset from UTC as "-HH:MM" (westward) or "+HH:MM"
** (eastward). Either no timezone suffix or "Z" means UTC.
*/
void finfo_page(void){
................................................................................
  GraphContext *pGraph;
  int brBg = P("brbg")!=0;
  int uBg = P("ubg")!=0;
  int fDebug = atoi(PD("debug","0"));
  int fShowId = P("showid")!=0;
  Stmt qparent;
  int iTableId = timeline_tableid();

  int bHashBeforeComment = 0; /* Show hash before the comment */
  int bHashAfterComment = 0;  /* Show hash after the comment */
  int bHashInDetail = 0;      /* Show the hash inside the detail section */
  int bShowDetail;            /* Show the detail section */
  int bSeparateDetail;        /* Detail section in a separate column */
  int eCommentFormat;         /* value for timeline-comment-format */

................................................................................
  login_anonymous_available();
  url_initialize(&url, "finfo");
  if( brBg ) url_add_parameter(&url, "brbg", 0);
  if( uBg ) url_add_parameter(&url, "ubg", 0);
  baseCheckin = name_to_rid_www("ci");
  zPrevDate[0] = 0;
  zFilename = PD("name","");
  eCommentFormat = db_get_int("timeline-comment-format", 0);
  bShowDetail = (eCommentFormat & 1)==0;  /* Bit 0 suppresses the comment */
  bSeparateDetail = (eCommentFormat & 8)!=0; 
  switch( (eCommentFormat>>1)&3 ){
    case 1:  bHashAfterComment = 1;  break;
    case 2:  bHashInDetail = 1;      break;
    default: bHashBeforeComment = 1; break;
  }
  fnid = db_int(0, "SELECT fnid FROM filename WHERE name=%Q", zFilename);
  if( fnid==0 ){
    @ No such file: %h(zFilename)
    style_footer();
    return;
  }
  if( g.perm.Admin ){
    style_submenu_element("MLink Table", "%R/mlink?name=%t", zFilename);
  }
  if( baseCheckin ){
    if( P("orig")!=0 ){
      origCheckin = name_to_typed_rid(P("orig"),"ci");
      path_shortest_stored_in_ancestor_table(origCheckin, baseCheckin);
    }else{
................................................................................
      fossil_free(zUuid);
    }
  }else{
    blob_appendf(&title, "History of ");
    hyperlinked_path(zFilename, &title, 0, "tree", "");
    if( fShowId ) blob_appendf(&title, " (%d)", fnid);
  }
  style_submenu_jsbutton("Advanced", STYLE_BASIC, "reclutter()");
  style_submenu_jsbutton("Basic", STYLE_CLUTTER, "declutter()");





  @ <h2>%b(&title)</h2>
  blob_reset(&title);
  pGraph = graph_init();
  @ <table id="timelineTable%d(iTableId)" class="timelineTable">
  if( baseCheckin ){
    db_prepare(&qparent,
      "SELECT DISTINCT pid FROM mlink"
................................................................................
      hyperlink_to_uuid(zUuid);
    }
    @ <span class="timelineComment timelineCheckinComment">%W(zCom)</span>
    if( bHashAfterComment && zUuid ){
      hyperlink_to_uuid(zUuid);
    }
    if( bShowDetail ){
      @ <a class='anticlutter' id='ellipsis-%d(frid)' \
      @  onclick='expandEllipsis(%d(frid))'>...</a>
      if( bSeparateDetail ){
        if( zBgClr && zBgClr[0] ){
          @ <td class="timelineTableCell timelineDetailCell"
          @  style="background-color: %h(zBgClr);">
        }else{
          @ <td class="timelineTableCell timelineDetailCell">
        }
      }
      cgi_printf("<span class='clutter' id='detail-%d'>", frid);
      cgi_printf("<span class='timelineDetail timelineCheckinDetail'>(");
      if( zUuid && bHashInDetail ){
        @ file: %z(href("%R/artifact/%!S",zUuid))[%S(zUuid)]</a>
        if( fShowId ){
          int srcId = delta_source_rid(frid);
          if( srcId>0 ){
            @ id: %d(frid)&larr;%d(srcId)
................................................................................
          @ %z(href("%R/finfo?name=%t",zNewName))%h(zNewName)</a>
          fossil_free(zNewName);
        }else{
          @ <b>Deleted</b>
        }
      }
    }
    if( g.perm.Hyperlink && zUuid ){
      const char *z = zFilename;
      @ <span id='links-%d(frid)'><span class='timelineExtraLinks'>
      @ %z(href("%R/annotate?filename=%h&checkin=%s",z,zCkin))
      @ [annotate]</a>
      @ %z(href("%R/blame?filename=%h&checkin=%s",z,zCkin))
      @ [blame]</a>
      @ %z(href("%R/timeline?n=all&uf=%!S",zUuid))[check-ins&nbsp;using]</a>
      if( fpid>0 ){
        @ %z(href("%R/fdiff?sbs=1&v1=%!S&v2=%!S",zPUuid,zUuid))[diff]</a>
      }
      @ </span></span>
    }
    if( fDebug & FINFO_DEBUG_MLINK ){
      int ii;
      char *zAncLink;
      @ <br />fid=%d(frid) pid=%d(fpid) mid=%d(fmid)
      if( nParent>0 ){
        @ parents=%d(aParent[0])
................................................................................
        }
      }
      zAncLink = href("%R/finfo?name=%T&ci=%!S&debug=1",zFilename,zCkin);
      @ %z(zAncLink)[ancestry]</a>
    }
    tag_private_status(frid);
    if( bShowDetail ){
      @ </span></span>
    }
    @ </td></tr>
  }
  db_finalize(&q);
  db_finalize(&qparent);
  if( pGraph ){
    graph_finish(pGraph, 1);

Changes to src/timeline.c.

505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
...
552
553
554
555
556
557
558


559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
....
1152
1153
1154
1155
1156
1157
1158







1159
1160
1161
1162
1163
1164
1165
        for(ii=0; ii<n; ii++){
          if( z[ii]=='\n' ){
            for(jj=ii+1; jj<n && z[jj]!='\n' && fossil_isspace(z[jj]); jj++){}
            if( z[jj]=='\n' ) break;
          }
        }
        z[ii] = 0;
        @ %W(z)
      }else if( mxWikiLen>0 && blob_size(&comment)>mxWikiLen ){
        Blob truncated;
        blob_zero(&truncated);
        blob_append(&truncated, blob_buffer(&comment), mxWikiLen);
        blob_append(&truncated, "...", 3);
        @ %W(blob_str(&truncated))
        blob_reset(&truncated);
      }else{
        @ %W(blob_str(&comment))
      }
      @ </span>
    }
    blob_reset(&comment);

    if( bHashAfterComment ){
      if( zType[0]=='c' ){
................................................................................
    }


    /* Generate extra information and hyperlinks to follow the comment.
    ** Example:  "(check-in: [abcdefg], user: drh, tags: trunk)"
    */
    if( bShowDetail ){


      if( bSeparateDetail ){
        if( zBgClr && zBgClr[0] && rid!=selectedRid ){
          @ <td class="timelineTableCell timelineDetailCell"
          @  style="background-color: %h(zBgClr);">
        }else{
          @ <td class="timelineTableCell timelineDetailCell">
        }
      }
      cgi_printf("<span class='clutter'>");
      if( zType[0]=='c' ){
        cgi_printf("<span class='timelineDetail timelineCheckinDetail'>(");
      }else{
        cgi_printf("<span class='timelineDetail'>(");
      }
  
      if( bHashInDetail ){
................................................................................
    @   changeDisplay('anticlutter','inline');
    @   checkHeight();
    @ }
    @ function reclutter(){
    @   changeDisplay('clutter','inline');
    @   changeDisplay('anticlutter','none');
    @   checkHeight();







    @ }
    @ var lastRow = gebi("m"+rowinfo[rowinfo.length-1].id);
    @ var lastY = 0;
    @ function checkHeight(){
    @   var h = absoluteY(lastRow);
    @   if( h!=lastY ){
    @     renderGraph();







|








|







 







>
>








|







 







>
>
>
>
>
>
>







505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
...
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
....
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
        for(ii=0; ii<n; ii++){
          if( z[ii]=='\n' ){
            for(jj=ii+1; jj<n && z[jj]!='\n' && fossil_isspace(z[jj]); jj++){}
            if( z[jj]=='\n' ) break;
          }
        }
        z[ii] = 0;
        cgi_printf("%W",z);
      }else if( mxWikiLen>0 && blob_size(&comment)>mxWikiLen ){
        Blob truncated;
        blob_zero(&truncated);
        blob_append(&truncated, blob_buffer(&comment), mxWikiLen);
        blob_append(&truncated, "...", 3);
        @ %W(blob_str(&truncated))
        blob_reset(&truncated);
      }else{
        cgi_printf("%W",blob_str(&comment));
      }
      @ </span>
    }
    blob_reset(&comment);

    if( bHashAfterComment ){
      if( zType[0]=='c' ){
................................................................................
    }


    /* Generate extra information and hyperlinks to follow the comment.
    ** Example:  "(check-in: [abcdefg], user: drh, tags: trunk)"
    */
    if( bShowDetail ){
      @ <a class='anticlutter' id='ellipsis-%d(rid)' \
      @  onclick='expandEllipsis(%d(rid))'>...</a>
      if( bSeparateDetail ){
        if( zBgClr && zBgClr[0] && rid!=selectedRid ){
          @ <td class="timelineTableCell timelineDetailCell"
          @  style="background-color: %h(zBgClr);">
        }else{
          @ <td class="timelineTableCell timelineDetailCell">
        }
      }
      cgi_printf("<span class='clutter' id='detail-%d'>", rid);
      if( zType[0]=='c' ){
        cgi_printf("<span class='timelineDetail timelineCheckinDetail'>(");
      }else{
        cgi_printf("<span class='timelineDetail'>(");
      }
  
      if( bHashInDetail ){
................................................................................
    @   changeDisplay('anticlutter','inline');
    @   checkHeight();
    @ }
    @ function reclutter(){
    @   changeDisplay('clutter','inline');
    @   changeDisplay('anticlutter','none');
    @   checkHeight();
    @ }
    @ function expandEllipsis(id){
    @   gebi("ellipsis-"+id).style.display='none';
    @   gebi("detail-"+id).style.display='inline';
    @   var x = gebi("links-"+id);
    @   if(x) x.style.display='inline';
    @   checkHeight();
    @ }
    @ var lastRow = gebi("m"+rowinfo[rowinfo.length-1].id);
    @ var lastY = 0;
    @ function checkHeight(){
    @   var h = absoluteY(lastRow);
    @   if( h!=lastY ){
    @     renderGraph();