Fossil SCM

Add the javascript Advanced/Basic buttons to the /finfo timeline.

drh 2017-11-25 21:21 declutter-via-js
Commit 6eaad787a8379d2a909581b9034f7dc16d2d7ac8063c3f98ffd432de04114d4c
--- skins/black_and_white/header.txt
+++ skins/black_and_white/header.txt
@@ -14,11 +14,11 @@
1414
</div>
1515
<div class="mainmenu">
1616
<th1>
1717
html "<a href='$home$index_page'>Home</a>\n"
1818
if {[anycap jor]} {
19
- html "<a href='$home/timeline?basic'>Timeline</a>\n"
19
+ html "<a href='$home/timeline'>Timeline</a>\n"
2020
}
2121
if {[anoncap oh]} {
2222
html "<a href='$home/tree?ci=tip'>Files</a>\n"
2323
}
2424
if {[anoncap o]} {
2525
--- skins/black_and_white/header.txt
+++ skins/black_and_white/header.txt
@@ -14,11 +14,11 @@
14 </div>
15 <div class="mainmenu">
16 <th1>
17 html "<a href='$home$index_page'>Home</a>\n"
18 if {[anycap jor]} {
19 html "<a href='$home/timeline?basic'>Timeline</a>\n"
20 }
21 if {[anoncap oh]} {
22 html "<a href='$home/tree?ci=tip'>Files</a>\n"
23 }
24 if {[anoncap o]} {
25
--- skins/black_and_white/header.txt
+++ skins/black_and_white/header.txt
@@ -14,11 +14,11 @@
14 </div>
15 <div class="mainmenu">
16 <th1>
17 html "<a href='$home$index_page'>Home</a>\n"
18 if {[anycap jor]} {
19 html "<a href='$home/timeline'>Timeline</a>\n"
20 }
21 if {[anoncap oh]} {
22 html "<a href='$home/tree?ci=tip'>Files</a>\n"
23 }
24 if {[anoncap o]} {
25
--- skins/blitz/header.txt
+++ skins/blitz/header.txt
@@ -37,11 +37,11 @@
3737
}
3838
html "<a href='$home$url'>$name</a></li>\n"
3939
}
4040
menulink $index_page Home
4141
if {[anycap jor]} {
42
- menulink /timeline?basic Timeline
42
+ menulink /timeline Timeline
4343
}
4444
if {[hascap oh]} {
4545
menulink /dir?ci=tip Files
4646
}
4747
if {[hascap o]} {
4848
--- skins/blitz/header.txt
+++ skins/blitz/header.txt
@@ -37,11 +37,11 @@
37 }
38 html "<a href='$home$url'>$name</a></li>\n"
39 }
40 menulink $index_page Home
41 if {[anycap jor]} {
42 menulink /timeline?basic Timeline
43 }
44 if {[hascap oh]} {
45 menulink /dir?ci=tip Files
46 }
47 if {[hascap o]} {
48
--- skins/blitz/header.txt
+++ skins/blitz/header.txt
@@ -37,11 +37,11 @@
37 }
38 html "<a href='$home$url'>$name</a></li>\n"
39 }
40 menulink $index_page Home
41 if {[anycap jor]} {
42 menulink /timeline Timeline
43 }
44 if {[hascap oh]} {
45 menulink /dir?ci=tip Files
46 }
47 if {[hascap o]} {
48
--- skins/blitz_no_logo/header.txt
+++ skins/blitz_no_logo/header.txt
@@ -34,11 +34,11 @@
3434
}
3535
html "<a href='$home$url'>$name</a></li>\n"
3636
}
3737
menulink $index_page Home
3838
if {[anycap jor]} {
39
- menulink /timeline?basic Timeline
39
+ menulink /timeline Timeline
4040
}
4141
if {[hascap oh]} {
4242
menulink /dir?ci=tip Files
4343
}
4444
if {[hascap o]} {
4545
--- skins/blitz_no_logo/header.txt
+++ skins/blitz_no_logo/header.txt
@@ -34,11 +34,11 @@
34 }
35 html "<a href='$home$url'>$name</a></li>\n"
36 }
37 menulink $index_page Home
38 if {[anycap jor]} {
39 menulink /timeline?basic Timeline
40 }
41 if {[hascap oh]} {
42 menulink /dir?ci=tip Files
43 }
44 if {[hascap o]} {
45
--- skins/blitz_no_logo/header.txt
+++ skins/blitz_no_logo/header.txt
@@ -34,11 +34,11 @@
34 }
35 html "<a href='$home$url'>$name</a></li>\n"
36 }
37 menulink $index_page Home
38 if {[anycap jor]} {
39 menulink /timeline Timeline
40 }
41 if {[hascap oh]} {
42 menulink /dir?ci=tip Files
43 }
44 if {[hascap o]} {
45
--- skins/bootstrap/header.txt
+++ skins/bootstrap/header.txt
@@ -54,13 +54,13 @@
5454
html "<li><a href='$home/wiki'>Wiki</a></li>\n"
5555
}
5656
}
5757
if {[anycap jor]} {
5858
if {[string compare $current_page "timeline"] == 0} {
59
- html "<li class='active'><a href='$home/timeline?basic'>Timeline</a></li>\n"
59
+ html "<li class='active'><a href='$home/timeline'>Timeline</a></li>\n"
6060
} else {
61
- html "<li><a href='$home/timeline?basic'>Timeline</a></li>\n"
61
+ html "<li><a href='$home/timeline'>Timeline</a></li>\n"
6262
}
6363
}
6464
if {[hascap oh]} {
6565
if {[string compare [string range $current_page 0 2] "dir"] == 0} {
6666
html "<li class='active'><a href='$home/dir?ci=tip'>Files</a></li>\n"
6767
--- skins/bootstrap/header.txt
+++ skins/bootstrap/header.txt
@@ -54,13 +54,13 @@
54 html "<li><a href='$home/wiki'>Wiki</a></li>\n"
55 }
56 }
57 if {[anycap jor]} {
58 if {[string compare $current_page "timeline"] == 0} {
59 html "<li class='active'><a href='$home/timeline?basic'>Timeline</a></li>\n"
60 } else {
61 html "<li><a href='$home/timeline?basic'>Timeline</a></li>\n"
62 }
63 }
64 if {[hascap oh]} {
65 if {[string compare [string range $current_page 0 2] "dir"] == 0} {
66 html "<li class='active'><a href='$home/dir?ci=tip'>Files</a></li>\n"
67
--- skins/bootstrap/header.txt
+++ skins/bootstrap/header.txt
@@ -54,13 +54,13 @@
54 html "<li><a href='$home/wiki'>Wiki</a></li>\n"
55 }
56 }
57 if {[anycap jor]} {
58 if {[string compare $current_page "timeline"] == 0} {
59 html "<li class='active'><a href='$home/timeline'>Timeline</a></li>\n"
60 } else {
61 html "<li><a href='$home/timeline'>Timeline</a></li>\n"
62 }
63 }
64 if {[hascap oh]} {
65 if {[string compare [string range $current_page 0 2] "dir"] == 0} {
66 html "<li class='active'><a href='$home/dir?ci=tip'>Files</a></li>\n"
67
--- skins/default/header.txt
+++ skins/default/header.txt
@@ -19,11 +19,11 @@
1919
html "<a href='$home$url'>$name</a>\n"
2020
}
2121
}
2222
menulink $index_page Home
2323
if {[anycap jor]} {
24
- menulink /timeline?basic Timeline
24
+ menulink /timeline Timeline
2525
}
2626
if {[hascap oh]} {
2727
menulink /dir?ci=tip Files
2828
}
2929
if {[hascap o]} {
3030
--- skins/default/header.txt
+++ skins/default/header.txt
@@ -19,11 +19,11 @@
19 html "<a href='$home$url'>$name</a>\n"
20 }
21 }
22 menulink $index_page Home
23 if {[anycap jor]} {
24 menulink /timeline?basic Timeline
25 }
26 if {[hascap oh]} {
27 menulink /dir?ci=tip Files
28 }
29 if {[hascap o]} {
30
--- skins/default/header.txt
+++ skins/default/header.txt
@@ -19,11 +19,11 @@
19 html "<a href='$home$url'>$name</a>\n"
20 }
21 }
22 menulink $index_page Home
23 if {[anycap jor]} {
24 menulink /timeline Timeline
25 }
26 if {[hascap oh]} {
27 menulink /dir?ci=tip Files
28 }
29 if {[hascap o]} {
30
--- skins/eagle/header.txt
+++ skins/eagle/header.txt
@@ -98,11 +98,11 @@
9898
html "<a href='$home$url'>$name</a>\n"
9999
}
100100
menulink $index_page Home
101101
menulink /help Help
102102
if {[anycap jor]} {
103
- menulink /timeline?basic Timeline
103
+ menulink /timeline Timeline
104104
}
105105
if {[anoncap oh]} {
106106
menulink /dir?ci=tip Files
107107
}
108108
if {[anoncap o]} {
109109
--- skins/eagle/header.txt
+++ skins/eagle/header.txt
@@ -98,11 +98,11 @@
98 html "<a href='$home$url'>$name</a>\n"
99 }
100 menulink $index_page Home
101 menulink /help Help
102 if {[anycap jor]} {
103 menulink /timeline?basic Timeline
104 }
105 if {[anoncap oh]} {
106 menulink /dir?ci=tip Files
107 }
108 if {[anoncap o]} {
109
--- skins/eagle/header.txt
+++ skins/eagle/header.txt
@@ -98,11 +98,11 @@
98 html "<a href='$home$url'>$name</a>\n"
99 }
100 menulink $index_page Home
101 menulink /help Help
102 if {[anycap jor]} {
103 menulink /timeline Timeline
104 }
105 if {[anoncap oh]} {
106 menulink /dir?ci=tip Files
107 }
108 if {[anoncap o]} {
109
--- skins/enhanced1/header.txt
+++ skins/enhanced1/header.txt
@@ -98,11 +98,11 @@
9898
html "<a href='$home$url'>$name</a>\n"
9999
}
100100
menulink $index_page Home
101101
menulink /help Help
102102
if {[anycap jor]} {
103
- menulink /timeline?basic Timeline
103
+ menulink /timeline Timeline
104104
}
105105
if {[anoncap oh]} {
106106
menulink /dir?ci=tip Files
107107
}
108108
if {[anoncap o]} {
109109
--- skins/enhanced1/header.txt
+++ skins/enhanced1/header.txt
@@ -98,11 +98,11 @@
98 html "<a href='$home$url'>$name</a>\n"
99 }
100 menulink $index_page Home
101 menulink /help Help
102 if {[anycap jor]} {
103 menulink /timeline?basic Timeline
104 }
105 if {[anoncap oh]} {
106 menulink /dir?ci=tip Files
107 }
108 if {[anoncap o]} {
109
--- skins/enhanced1/header.txt
+++ skins/enhanced1/header.txt
@@ -98,11 +98,11 @@
98 html "<a href='$home$url'>$name</a>\n"
99 }
100 menulink $index_page Home
101 menulink /help Help
102 if {[anycap jor]} {
103 menulink /timeline Timeline
104 }
105 if {[anoncap oh]} {
106 menulink /dir?ci=tip Files
107 }
108 if {[anoncap o]} {
109
--- skins/khaki/header.txt
+++ skins/khaki/header.txt
@@ -12,11 +12,11 @@
1212
</div>
1313
<div class="mainmenu">
1414
<th1>
1515
html "<a href='$home$index_page'>Home</a>\n"
1616
if {[anycap jor]} {
17
- html "<a href='$home/timeline?basic'>Timeline</a>\n"
17
+ html "<a href='$home/timeline'>Timeline</a>\n"
1818
}
1919
if {[anoncap oh]} {
2020
html "<a href='$home/tree?ci=tip'>Files</a>\n"
2121
}
2222
if {[anoncap o]} {
2323
--- skins/khaki/header.txt
+++ skins/khaki/header.txt
@@ -12,11 +12,11 @@
12 </div>
13 <div class="mainmenu">
14 <th1>
15 html "<a href='$home$index_page'>Home</a>\n"
16 if {[anycap jor]} {
17 html "<a href='$home/timeline?basic'>Timeline</a>\n"
18 }
19 if {[anoncap oh]} {
20 html "<a href='$home/tree?ci=tip'>Files</a>\n"
21 }
22 if {[anoncap o]} {
23
--- skins/khaki/header.txt
+++ skins/khaki/header.txt
@@ -12,11 +12,11 @@
12 </div>
13 <div class="mainmenu">
14 <th1>
15 html "<a href='$home$index_page'>Home</a>\n"
16 if {[anycap jor]} {
17 html "<a href='$home/timeline'>Timeline</a>\n"
18 }
19 if {[anoncap oh]} {
20 html "<a href='$home/tree?ci=tip'>Files</a>\n"
21 }
22 if {[anoncap o]} {
23
--- skins/original/header.txt
+++ skins/original/header.txt
@@ -13,11 +13,11 @@
1313
</div>
1414
<div class="mainmenu">
1515
<th1>
1616
html "<a href='$home$index_page'>Home</a>\n"
1717
if {[anycap jor]} {
18
- html "<a href='$home/timeline?basic'>Timeline</a>\n"
18
+ html "<a href='$home/timeline'>Timeline</a>\n"
1919
}
2020
if {[anoncap oh]} {
2121
html "<a href='$home/tree?ci=tip'>Files</a>\n"
2222
}
2323
if {[anoncap o]} {
2424
--- skins/original/header.txt
+++ skins/original/header.txt
@@ -13,11 +13,11 @@
13 </div>
14 <div class="mainmenu">
15 <th1>
16 html "<a href='$home$index_page'>Home</a>\n"
17 if {[anycap jor]} {
18 html "<a href='$home/timeline?basic'>Timeline</a>\n"
19 }
20 if {[anoncap oh]} {
21 html "<a href='$home/tree?ci=tip'>Files</a>\n"
22 }
23 if {[anoncap o]} {
24
--- skins/original/header.txt
+++ skins/original/header.txt
@@ -13,11 +13,11 @@
13 </div>
14 <div class="mainmenu">
15 <th1>
16 html "<a href='$home$index_page'>Home</a>\n"
17 if {[anycap jor]} {
18 html "<a href='$home/timeline'>Timeline</a>\n"
19 }
20 if {[anoncap oh]} {
21 html "<a href='$home/tree?ci=tip'>Files</a>\n"
22 }
23 if {[anoncap o]} {
24
--- skins/plain_gray/header.txt
+++ skins/plain_gray/header.txt
@@ -10,11 +10,11 @@
1010
</div>
1111
<div class="mainmenu">
1212
<th1>
1313
html "<a href='$home$index_page'>Home</a>\n"
1414
if {[anycap jor]} {
15
- html "<a href='$home/timeline?basic'>Timeline</a>\n"
15
+ html "<a href='$home/timeline'>Timeline</a>\n"
1616
}
1717
if {[anoncap oh]} {
1818
html "<a href='$home/tree?ci=tip'>Files</a>\n"
1919
}
2020
if {[anoncap o]} {
2121
--- skins/plain_gray/header.txt
+++ skins/plain_gray/header.txt
@@ -10,11 +10,11 @@
10 </div>
11 <div class="mainmenu">
12 <th1>
13 html "<a href='$home$index_page'>Home</a>\n"
14 if {[anycap jor]} {
15 html "<a href='$home/timeline?basic'>Timeline</a>\n"
16 }
17 if {[anoncap oh]} {
18 html "<a href='$home/tree?ci=tip'>Files</a>\n"
19 }
20 if {[anoncap o]} {
21
--- skins/plain_gray/header.txt
+++ skins/plain_gray/header.txt
@@ -10,11 +10,11 @@
10 </div>
11 <div class="mainmenu">
12 <th1>
13 html "<a href='$home$index_page'>Home</a>\n"
14 if {[anycap jor]} {
15 html "<a href='$home/timeline'>Timeline</a>\n"
16 }
17 if {[anoncap oh]} {
18 html "<a href='$home/tree?ci=tip'>Files</a>\n"
19 }
20 if {[anoncap o]} {
21
--- skins/rounded1/header.txt
+++ skins/rounded1/header.txt
@@ -14,11 +14,11 @@
1414
</div>
1515
<div class="mainmenu">
1616
<th1>
1717
html "<a href='$home$index_page'>Home</a>\n"
1818
if {[anycap jor]} {
19
- html "<a href='$home/timeline?basic'>Timeline</a>\n"
19
+ html "<a href='$home/timeline'>Timeline</a>\n"
2020
}
2121
if {[anoncap oh]} {
2222
html "<a href='$home/tree?ci=tip'>Files</a>\n"
2323
}
2424
if {[anoncap o]} {
2525
--- skins/rounded1/header.txt
+++ skins/rounded1/header.txt
@@ -14,11 +14,11 @@
14 </div>
15 <div class="mainmenu">
16 <th1>
17 html "<a href='$home$index_page'>Home</a>\n"
18 if {[anycap jor]} {
19 html "<a href='$home/timeline?basic'>Timeline</a>\n"
20 }
21 if {[anoncap oh]} {
22 html "<a href='$home/tree?ci=tip'>Files</a>\n"
23 }
24 if {[anoncap o]} {
25
--- skins/rounded1/header.txt
+++ skins/rounded1/header.txt
@@ -14,11 +14,11 @@
14 </div>
15 <div class="mainmenu">
16 <th1>
17 html "<a href='$home$index_page'>Home</a>\n"
18 if {[anycap jor]} {
19 html "<a href='$home/timeline'>Timeline</a>\n"
20 }
21 if {[anoncap oh]} {
22 html "<a href='$home/tree?ci=tip'>Files</a>\n"
23 }
24 if {[anoncap o]} {
25
--- skins/xekri/header.txt
+++ skins/xekri/header.txt
@@ -102,11 +102,11 @@
102102
html "<a href='$home$url'>$name</a>\n"
103103
}
104104
}
105105
menulink $index_page Home
106106
if {[anycap jor]} {
107
- menulink /timeline?basic Timeline
107
+ menulink /timeline Timeline
108108
}
109109
if {[anoncap oh]} {
110110
menulink /dir?ci=tip Files
111111
}
112112
if {[anoncap o]} {
113113
--- skins/xekri/header.txt
+++ skins/xekri/header.txt
@@ -102,11 +102,11 @@
102 html "<a href='$home$url'>$name</a>\n"
103 }
104 }
105 menulink $index_page Home
106 if {[anycap jor]} {
107 menulink /timeline?basic Timeline
108 }
109 if {[anoncap oh]} {
110 menulink /dir?ci=tip Files
111 }
112 if {[anoncap o]} {
113
--- skins/xekri/header.txt
+++ skins/xekri/header.txt
@@ -102,11 +102,11 @@
102 html "<a href='$home$url'>$name</a>\n"
103 }
104 }
105 menulink $index_page Home
106 if {[anycap jor]} {
107 menulink /timeline Timeline
108 }
109 if {[anoncap oh]} {
110 menulink /dir?ci=tip Files
111 }
112 if {[anoncap o]} {
113
+11 -15
--- src/finfo.c
+++ src/finfo.c
@@ -287,11 +287,10 @@
287287
** ubg Background color by user name
288288
** ci=UUID Ancestors of a particular check-in
289289
** orig=UUID If both ci and orig are supplied, only show those
290290
** changes on a direct path from orig to ci.
291291
** showid Show RID values for debugging
292
-** basic Minimize clutter and complication
293292
**
294293
** DATETIME may be "now" or "YYYY-MM-DDTHH:MM:SS.SSS". If in
295294
** year-month-day form, it may be truncated, and it may also name a
296295
** timezone offset from UTC as "-HH:MM" (westward) or "+HH:MM"
297296
** (eastward). Either no timezone suffix or "Z" means UTC.
@@ -314,11 +313,10 @@
314313
int uBg = P("ubg")!=0;
315314
int fDebug = atoi(PD("debug","0"));
316315
int fShowId = P("showid")!=0;
317316
Stmt qparent;
318317
int iTableId = timeline_tableid();
319
- int bBasic = PB("basic");
320318
int bHashBeforeComment = 0; /* Show hash before the comment */
321319
int bHashAfterComment = 0; /* Show hash after the comment */
322320
int bHashInDetail = 0; /* Show the hash inside the detail section */
323321
int bShowDetail; /* Show the detail section */
324322
int bSeparateDetail; /* Detail section in a separate column */
@@ -332,11 +330,11 @@
332330
if( brBg ) url_add_parameter(&url, "brbg", 0);
333331
if( uBg ) url_add_parameter(&url, "ubg", 0);
334332
baseCheckin = name_to_rid_www("ci");
335333
zPrevDate[0] = 0;
336334
zFilename = PD("name","");
337
- eCommentFormat = bBasic ? 5 : db_get_int("timeline-comment-format", 0);
335
+ eCommentFormat = db_get_int("timeline-comment-format", 0);
338336
bShowDetail = (eCommentFormat & 1)==0; /* Bit 0 suppresses the comment */
339337
bSeparateDetail = (eCommentFormat & 8)!=0;
340338
switch( (eCommentFormat>>1)&3 ){
341339
case 1: bHashAfterComment = 1; break;
342340
case 2: bHashInDetail = 1; break;
@@ -346,11 +344,11 @@
346344
if( fnid==0 ){
347345
@ No such file: %h(zFilename)
348346
style_footer();
349347
return;
350348
}
351
- if( g.perm.Admin && !bBasic ){
349
+ if( g.perm.Admin ){
352350
style_submenu_element("MLink Table", "%R/mlink?name=%t", zFilename);
353351
}
354352
if( baseCheckin ){
355353
if( P("orig")!=0 ){
356354
origCheckin = name_to_typed_rid(P("orig"),"ci");
@@ -447,17 +445,12 @@
447445
}else{
448446
blob_appendf(&title, "History of ");
449447
hyperlinked_path(zFilename, &title, 0, "tree", "");
450448
if( fShowId ) blob_appendf(&title, " (%d)", fnid);
451449
}
452
- if( bBasic ){
453
- style_submenu_element("Details", "%s",
454
- url_render(&url, "basic", 0, 0, 0));
455
- }else{
456
- style_submenu_element("Declutter", "%s",
457
- url_render(&url, "basic", "1", 0, 0));
458
- }
450
+ style_submenu_jsbutton("Advanced", STYLE_BASIC, "reclutter()");
451
+ style_submenu_jsbutton("Basic", STYLE_CLUTTER, "declutter()");
459452
@ <h2>%b(&title)</h2>
460453
blob_reset(&title);
461454
pGraph = graph_init();
462455
@ <table id="timelineTable%d(iTableId)" class="timelineTable">
463456
if( baseCheckin ){
@@ -533,18 +526,21 @@
533526
@ <span class="timelineComment timelineCheckinComment">%W(zCom)</span>
534527
if( bHashAfterComment && zUuid ){
535528
hyperlink_to_uuid(zUuid);
536529
}
537530
if( bShowDetail ){
531
+ @ <a class='anticlutter' id='ellipsis-%d(frid)' \
532
+ @ onclick='expandEllipsis(%d(frid))'>...</a>
538533
if( bSeparateDetail ){
539534
if( zBgClr && zBgClr[0] ){
540535
@ <td class="timelineTableCell timelineDetailCell"
541536
@ style="background-color: %h(zBgClr);">
542537
}else{
543538
@ <td class="timelineTableCell timelineDetailCell">
544539
}
545540
}
541
+ cgi_printf("<span class='clutter' id='detail-%d'>", frid);
546542
cgi_printf("<span class='timelineDetail timelineCheckinDetail'>(");
547543
if( zUuid && bHashInDetail ){
548544
@ file: %z(href("%R/artifact/%!S",zUuid))[%S(zUuid)]</a>
549545
if( fShowId ){
550546
int srcId = delta_source_rid(frid);
@@ -589,22 +585,22 @@
589585
}else{
590586
@ <b>Deleted</b>
591587
}
592588
}
593589
}
594
- if( g.perm.Hyperlink && zUuid && !bBasic ){
590
+ if( g.perm.Hyperlink && zUuid ){
595591
const char *z = zFilename;
596
- @ <span class='timelineExtraLinks'>
592
+ @ <span id='links-%d(frid)'><span class='timelineExtraLinks'>
597593
@ %z(href("%R/annotate?filename=%h&checkin=%s",z,zCkin))
598594
@ [annotate]</a>
599595
@ %z(href("%R/blame?filename=%h&checkin=%s",z,zCkin))
600596
@ [blame]</a>
601597
@ %z(href("%R/timeline?n=all&uf=%!S",zUuid))[check-ins&nbsp;using]</a>
602598
if( fpid>0 ){
603599
@ %z(href("%R/fdiff?sbs=1&v1=%!S&v2=%!S",zPUuid,zUuid))[diff]</a>
604600
}
605
- @ </span>
601
+ @ </span></span>
606602
}
607603
if( fDebug & FINFO_DEBUG_MLINK ){
608604
int ii;
609605
char *zAncLink;
610606
@ <br />fid=%d(frid) pid=%d(fpid) mid=%d(fmid)
@@ -617,11 +613,11 @@
617613
zAncLink = href("%R/finfo?name=%T&ci=%!S&debug=1",zFilename,zCkin);
618614
@ %z(zAncLink)[ancestry]</a>
619615
}
620616
tag_private_status(frid);
621617
if( bShowDetail ){
622
- @ </span>
618
+ @ </span></span>
623619
}
624620
@ </td></tr>
625621
}
626622
db_finalize(&q);
627623
db_finalize(&qparent);
628624
--- src/finfo.c
+++ src/finfo.c
@@ -287,11 +287,10 @@
287 ** ubg Background color by user name
288 ** ci=UUID Ancestors of a particular check-in
289 ** orig=UUID If both ci and orig are supplied, only show those
290 ** changes on a direct path from orig to ci.
291 ** showid Show RID values for debugging
292 ** basic Minimize clutter and complication
293 **
294 ** DATETIME may be "now" or "YYYY-MM-DDTHH:MM:SS.SSS". If in
295 ** year-month-day form, it may be truncated, and it may also name a
296 ** timezone offset from UTC as "-HH:MM" (westward) or "+HH:MM"
297 ** (eastward). Either no timezone suffix or "Z" means UTC.
@@ -314,11 +313,10 @@
314 int uBg = P("ubg")!=0;
315 int fDebug = atoi(PD("debug","0"));
316 int fShowId = P("showid")!=0;
317 Stmt qparent;
318 int iTableId = timeline_tableid();
319 int bBasic = PB("basic");
320 int bHashBeforeComment = 0; /* Show hash before the comment */
321 int bHashAfterComment = 0; /* Show hash after the comment */
322 int bHashInDetail = 0; /* Show the hash inside the detail section */
323 int bShowDetail; /* Show the detail section */
324 int bSeparateDetail; /* Detail section in a separate column */
@@ -332,11 +330,11 @@
332 if( brBg ) url_add_parameter(&url, "brbg", 0);
333 if( uBg ) url_add_parameter(&url, "ubg", 0);
334 baseCheckin = name_to_rid_www("ci");
335 zPrevDate[0] = 0;
336 zFilename = PD("name","");
337 eCommentFormat = bBasic ? 5 : db_get_int("timeline-comment-format", 0);
338 bShowDetail = (eCommentFormat & 1)==0; /* Bit 0 suppresses the comment */
339 bSeparateDetail = (eCommentFormat & 8)!=0;
340 switch( (eCommentFormat>>1)&3 ){
341 case 1: bHashAfterComment = 1; break;
342 case 2: bHashInDetail = 1; break;
@@ -346,11 +344,11 @@
346 if( fnid==0 ){
347 @ No such file: %h(zFilename)
348 style_footer();
349 return;
350 }
351 if( g.perm.Admin && !bBasic ){
352 style_submenu_element("MLink Table", "%R/mlink?name=%t", zFilename);
353 }
354 if( baseCheckin ){
355 if( P("orig")!=0 ){
356 origCheckin = name_to_typed_rid(P("orig"),"ci");
@@ -447,17 +445,12 @@
447 }else{
448 blob_appendf(&title, "History of ");
449 hyperlinked_path(zFilename, &title, 0, "tree", "");
450 if( fShowId ) blob_appendf(&title, " (%d)", fnid);
451 }
452 if( bBasic ){
453 style_submenu_element("Details", "%s",
454 url_render(&url, "basic", 0, 0, 0));
455 }else{
456 style_submenu_element("Declutter", "%s",
457 url_render(&url, "basic", "1", 0, 0));
458 }
459 @ <h2>%b(&title)</h2>
460 blob_reset(&title);
461 pGraph = graph_init();
462 @ <table id="timelineTable%d(iTableId)" class="timelineTable">
463 if( baseCheckin ){
@@ -533,18 +526,21 @@
533 @ <span class="timelineComment timelineCheckinComment">%W(zCom)</span>
534 if( bHashAfterComment && zUuid ){
535 hyperlink_to_uuid(zUuid);
536 }
537 if( bShowDetail ){
 
 
538 if( bSeparateDetail ){
539 if( zBgClr && zBgClr[0] ){
540 @ <td class="timelineTableCell timelineDetailCell"
541 @ style="background-color: %h(zBgClr);">
542 }else{
543 @ <td class="timelineTableCell timelineDetailCell">
544 }
545 }
 
546 cgi_printf("<span class='timelineDetail timelineCheckinDetail'>(");
547 if( zUuid && bHashInDetail ){
548 @ file: %z(href("%R/artifact/%!S",zUuid))[%S(zUuid)]</a>
549 if( fShowId ){
550 int srcId = delta_source_rid(frid);
@@ -589,22 +585,22 @@
589 }else{
590 @ <b>Deleted</b>
591 }
592 }
593 }
594 if( g.perm.Hyperlink && zUuid && !bBasic ){
595 const char *z = zFilename;
596 @ <span class='timelineExtraLinks'>
597 @ %z(href("%R/annotate?filename=%h&checkin=%s",z,zCkin))
598 @ [annotate]</a>
599 @ %z(href("%R/blame?filename=%h&checkin=%s",z,zCkin))
600 @ [blame]</a>
601 @ %z(href("%R/timeline?n=all&uf=%!S",zUuid))[check-ins&nbsp;using]</a>
602 if( fpid>0 ){
603 @ %z(href("%R/fdiff?sbs=1&v1=%!S&v2=%!S",zPUuid,zUuid))[diff]</a>
604 }
605 @ </span>
606 }
607 if( fDebug & FINFO_DEBUG_MLINK ){
608 int ii;
609 char *zAncLink;
610 @ <br />fid=%d(frid) pid=%d(fpid) mid=%d(fmid)
@@ -617,11 +613,11 @@
617 zAncLink = href("%R/finfo?name=%T&ci=%!S&debug=1",zFilename,zCkin);
618 @ %z(zAncLink)[ancestry]</a>
619 }
620 tag_private_status(frid);
621 if( bShowDetail ){
622 @ </span>
623 }
624 @ </td></tr>
625 }
626 db_finalize(&q);
627 db_finalize(&qparent);
628
--- src/finfo.c
+++ src/finfo.c
@@ -287,11 +287,10 @@
287 ** ubg Background color by user name
288 ** ci=UUID Ancestors of a particular check-in
289 ** orig=UUID If both ci and orig are supplied, only show those
290 ** changes on a direct path from orig to ci.
291 ** showid Show RID values for debugging
 
292 **
293 ** DATETIME may be "now" or "YYYY-MM-DDTHH:MM:SS.SSS". If in
294 ** year-month-day form, it may be truncated, and it may also name a
295 ** timezone offset from UTC as "-HH:MM" (westward) or "+HH:MM"
296 ** (eastward). Either no timezone suffix or "Z" means UTC.
@@ -314,11 +313,10 @@
313 int uBg = P("ubg")!=0;
314 int fDebug = atoi(PD("debug","0"));
315 int fShowId = P("showid")!=0;
316 Stmt qparent;
317 int iTableId = timeline_tableid();
 
318 int bHashBeforeComment = 0; /* Show hash before the comment */
319 int bHashAfterComment = 0; /* Show hash after the comment */
320 int bHashInDetail = 0; /* Show the hash inside the detail section */
321 int bShowDetail; /* Show the detail section */
322 int bSeparateDetail; /* Detail section in a separate column */
@@ -332,11 +330,11 @@
330 if( brBg ) url_add_parameter(&url, "brbg", 0);
331 if( uBg ) url_add_parameter(&url, "ubg", 0);
332 baseCheckin = name_to_rid_www("ci");
333 zPrevDate[0] = 0;
334 zFilename = PD("name","");
335 eCommentFormat = db_get_int("timeline-comment-format", 0);
336 bShowDetail = (eCommentFormat & 1)==0; /* Bit 0 suppresses the comment */
337 bSeparateDetail = (eCommentFormat & 8)!=0;
338 switch( (eCommentFormat>>1)&3 ){
339 case 1: bHashAfterComment = 1; break;
340 case 2: bHashInDetail = 1; break;
@@ -346,11 +344,11 @@
344 if( fnid==0 ){
345 @ No such file: %h(zFilename)
346 style_footer();
347 return;
348 }
349 if( g.perm.Admin ){
350 style_submenu_element("MLink Table", "%R/mlink?name=%t", zFilename);
351 }
352 if( baseCheckin ){
353 if( P("orig")!=0 ){
354 origCheckin = name_to_typed_rid(P("orig"),"ci");
@@ -447,17 +445,12 @@
445 }else{
446 blob_appendf(&title, "History of ");
447 hyperlinked_path(zFilename, &title, 0, "tree", "");
448 if( fShowId ) blob_appendf(&title, " (%d)", fnid);
449 }
450 style_submenu_jsbutton("Advanced", STYLE_BASIC, "reclutter()");
451 style_submenu_jsbutton("Basic", STYLE_CLUTTER, "declutter()");
 
 
 
 
 
452 @ <h2>%b(&title)</h2>
453 blob_reset(&title);
454 pGraph = graph_init();
455 @ <table id="timelineTable%d(iTableId)" class="timelineTable">
456 if( baseCheckin ){
@@ -533,18 +526,21 @@
526 @ <span class="timelineComment timelineCheckinComment">%W(zCom)</span>
527 if( bHashAfterComment && zUuid ){
528 hyperlink_to_uuid(zUuid);
529 }
530 if( bShowDetail ){
531 @ <a class='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 @ <td class="timelineTableCell timelineDetailCell">
539 }
540 }
541 cgi_printf("<span class='clutter' id='detail-%d'>", frid);
542 cgi_printf("<span class='timelineDetail timelineCheckinDetail'>(");
543 if( zUuid && bHashInDetail ){
544 @ file: %z(href("%R/artifact/%!S",zUuid))[%S(zUuid)]</a>
545 if( fShowId ){
546 int srcId = delta_source_rid(frid);
@@ -589,22 +585,22 @@
585 }else{
586 @ <b>Deleted</b>
587 }
588 }
589 }
590 if( g.perm.Hyperlink && zUuid ){
591 const char *z = zFilename;
592 @ <span id='links-%d(frid)'><span class='timelineExtraLinks'>
593 @ %z(href("%R/annotate?filename=%h&checkin=%s",z,zCkin))
594 @ [annotate]</a>
595 @ %z(href("%R/blame?filename=%h&checkin=%s",z,zCkin))
596 @ [blame]</a>
597 @ %z(href("%R/timeline?n=all&uf=%!S",zUuid))[check-ins&nbsp;using]</a>
598 if( fpid>0 ){
599 @ %z(href("%R/fdiff?sbs=1&v1=%!S&v2=%!S",zPUuid,zUuid))[diff]</a>
600 }
601 @ </span></span>
602 }
603 if( fDebug & FINFO_DEBUG_MLINK ){
604 int ii;
605 char *zAncLink;
606 @ <br />fid=%d(frid) pid=%d(fpid) mid=%d(fmid)
@@ -617,11 +613,11 @@
613 zAncLink = href("%R/finfo?name=%T&ci=%!S&debug=1",zFilename,zCkin);
614 @ %z(zAncLink)[ancestry]</a>
615 }
616 tag_private_status(frid);
617 if( bShowDetail ){
618 @ </span></span>
619 }
620 @ </td></tr>
621 }
622 db_finalize(&q);
623 db_finalize(&qparent);
624
+12 -3
--- src/timeline.c
+++ src/timeline.c
@@ -507,20 +507,20 @@
507507
for(jj=ii+1; jj<n && z[jj]!='\n' && fossil_isspace(z[jj]); jj++){}
508508
if( z[jj]=='\n' ) break;
509509
}
510510
}
511511
z[ii] = 0;
512
- @ %W(z)
512
+ cgi_printf("%W",z);
513513
}else if( mxWikiLen>0 && blob_size(&comment)>mxWikiLen ){
514514
Blob truncated;
515515
blob_zero(&truncated);
516516
blob_append(&truncated, blob_buffer(&comment), mxWikiLen);
517517
blob_append(&truncated, "...", 3);
518518
@ %W(blob_str(&truncated))
519519
blob_reset(&truncated);
520520
}else{
521
- @ %W(blob_str(&comment))
521
+ cgi_printf("%W",blob_str(&comment));
522522
}
523523
@ </span>
524524
}
525525
blob_reset(&comment);
526526
@@ -554,19 +554,21 @@
554554
555555
/* Generate extra information and hyperlinks to follow the comment.
556556
** Example: "(check-in: [abcdefg], user: drh, tags: trunk)"
557557
*/
558558
if( bShowDetail ){
559
+ @ <a class='anticlutter' id='ellipsis-%d(rid)' \
560
+ @ onclick='expandEllipsis(%d(rid))'>...</a>
559561
if( bSeparateDetail ){
560562
if( zBgClr && zBgClr[0] && rid!=selectedRid ){
561563
@ <td class="timelineTableCell timelineDetailCell"
562564
@ style="background-color: %h(zBgClr);">
563565
}else{
564566
@ <td class="timelineTableCell timelineDetailCell">
565567
}
566568
}
567
- cgi_printf("<span class='clutter'>");
569
+ cgi_printf("<span class='clutter' id='detail-%d'>", rid);
568570
if( zType[0]=='c' ){
569571
cgi_printf("<span class='timelineDetail timelineCheckinDetail'>(");
570572
}else{
571573
cgi_printf("<span class='timelineDetail'>(");
572574
}
@@ -1154,10 +1156,17 @@
11541156
@ }
11551157
@ function reclutter(){
11561158
@ changeDisplay('clutter','inline');
11571159
@ changeDisplay('anticlutter','none');
11581160
@ 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();
11591168
@ }
11601169
@ var lastRow = gebi("m"+rowinfo[rowinfo.length-1].id);
11611170
@ var lastY = 0;
11621171
@ function checkHeight(){
11631172
@ var h = absoluteY(lastRow);
11641173
--- src/timeline.c
+++ src/timeline.c
@@ -507,20 +507,20 @@
507 for(jj=ii+1; jj<n && z[jj]!='\n' && fossil_isspace(z[jj]); jj++){}
508 if( z[jj]=='\n' ) break;
509 }
510 }
511 z[ii] = 0;
512 @ %W(z)
513 }else if( mxWikiLen>0 && blob_size(&comment)>mxWikiLen ){
514 Blob truncated;
515 blob_zero(&truncated);
516 blob_append(&truncated, blob_buffer(&comment), mxWikiLen);
517 blob_append(&truncated, "...", 3);
518 @ %W(blob_str(&truncated))
519 blob_reset(&truncated);
520 }else{
521 @ %W(blob_str(&comment))
522 }
523 @ </span>
524 }
525 blob_reset(&comment);
526
@@ -554,19 +554,21 @@
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 if( bSeparateDetail ){
560 if( zBgClr && zBgClr[0] && rid!=selectedRid ){
561 @ <td class="timelineTableCell timelineDetailCell"
562 @ style="background-color: %h(zBgClr);">
563 }else{
564 @ <td class="timelineTableCell timelineDetailCell">
565 }
566 }
567 cgi_printf("<span class='clutter'>");
568 if( zType[0]=='c' ){
569 cgi_printf("<span class='timelineDetail timelineCheckinDetail'>(");
570 }else{
571 cgi_printf("<span class='timelineDetail'>(");
572 }
@@ -1154,10 +1156,17 @@
1154 @ }
1155 @ function reclutter(){
1156 @ changeDisplay('clutter','inline');
1157 @ changeDisplay('anticlutter','none');
1158 @ checkHeight();
 
 
 
 
 
 
 
1159 @ }
1160 @ var lastRow = gebi("m"+rowinfo[rowinfo.length-1].id);
1161 @ var lastY = 0;
1162 @ function checkHeight(){
1163 @ var h = absoluteY(lastRow);
1164
--- src/timeline.c
+++ src/timeline.c
@@ -507,20 +507,20 @@
507 for(jj=ii+1; jj<n && z[jj]!='\n' && fossil_isspace(z[jj]); jj++){}
508 if( z[jj]=='\n' ) break;
509 }
510 }
511 z[ii] = 0;
512 cgi_printf("%W",z);
513 }else if( mxWikiLen>0 && blob_size(&comment)>mxWikiLen ){
514 Blob truncated;
515 blob_zero(&truncated);
516 blob_append(&truncated, blob_buffer(&comment), mxWikiLen);
517 blob_append(&truncated, "...", 3);
518 @ %W(blob_str(&truncated))
519 blob_reset(&truncated);
520 }else{
521 cgi_printf("%W",blob_str(&comment));
522 }
523 @ </span>
524 }
525 blob_reset(&comment);
526
@@ -554,19 +554,21 @@
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='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{
566 @ <td class="timelineTableCell timelineDetailCell">
567 }
568 }
569 cgi_printf("<span class='clutter' id='detail-%d'>", rid);
570 if( zType[0]=='c' ){
571 cgi_printf("<span class='timelineDetail timelineCheckinDetail'>(");
572 }else{
573 cgi_printf("<span class='timelineDetail'>(");
574 }
@@ -1154,10 +1156,17 @@
1156 @ }
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 @ var h = absoluteY(lastRow);
1173

Keyboard Shortcuts

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