Fossil SCM

Do not scroll to the select element of "Context" timelines.

drh 2017-12-06 18:48 trunk
Commit cee4bcf047bacba9cf3d496b5a9aa29140d5b363ddd922c1f2034f7b10c82217
+1 -1
--- src/finfo.c
+++ src/finfo.c
@@ -636,11 +636,11 @@
636636
}else{
637637
@ <tr class="timelineBottom"><td></td><td></td><td></td></tr>
638638
}
639639
}
640640
@ </table>
641
- timeline_output_graph_javascript(pGraph, 0, iTableId, 1);
641
+ timeline_output_graph_javascript(pGraph, TIMELINE_FILEDIFF, iTableId);
642642
style_footer();
643643
}
644644
645645
/*
646646
** WEBPAGE: mlink
647647
--- src/finfo.c
+++ src/finfo.c
@@ -636,11 +636,11 @@
636 }else{
637 @ <tr class="timelineBottom"><td></td><td></td><td></td></tr>
638 }
639 }
640 @ </table>
641 timeline_output_graph_javascript(pGraph, 0, iTableId, 1);
642 style_footer();
643 }
644
645 /*
646 ** WEBPAGE: mlink
647
--- src/finfo.c
+++ src/finfo.c
@@ -636,11 +636,11 @@
636 }else{
637 @ <tr class="timelineBottom"><td></td><td></td><td></td></tr>
638 }
639 }
640 @ </table>
641 timeline_output_graph_javascript(pGraph, TIMELINE_FILEDIFF, iTableId);
642 style_footer();
643 }
644
645 /*
646 ** WEBPAGE: mlink
647
+4 -1
--- src/graph.js
+++ src/graph.js
@@ -11,10 +11,11 @@
1111
** "colorGraph": BOOLEAN, // True to put color on graph lines
1212
** "nomo": BOOLEAN, // True to join merge lines with rails
1313
** "iTopRow": INTEGER, // Index of top-most row in the graph
1414
** "omitDescenders": BOOLEAN, // Omit ancestor lines off bottom of screen
1515
** "fileDiff": BOOLEAN, // True for file diff. False for check-in
16
+** "scrollToSelect": BOOLEAN, // Scroll to selection on first render
1617
** "nrail": INTEGER, // Number of vertical "rails"
1718
** "baseUrl": TEXT, // Top-level URL
1819
** "rowinfo": ROWINFO-ARRAY }
1920
**
2021
** The rowinfo field is an array of structures, one per entry in the timeline,
@@ -347,11 +348,13 @@
347348
}
348349
setTimeout(checkHeight, 1000);
349350
}
350351
initGraph();
351352
checkHeight();
352
- scrollToSelected();
353
+ if( tx.scrollToSelect ){
354
+ scrollToSelected();
355
+ }
353356
354357
/* Set the onclick= attributes for elements of the "Compact" display
355358
** mode so that clicking turns the details on and off.
356359
*/
357360
var lx = topObj.getElementsByClassName('timelineEllipsis');
358361
--- src/graph.js
+++ src/graph.js
@@ -11,10 +11,11 @@
11 ** "colorGraph": BOOLEAN, // True to put color on graph lines
12 ** "nomo": BOOLEAN, // True to join merge lines with rails
13 ** "iTopRow": INTEGER, // Index of top-most row in the graph
14 ** "omitDescenders": BOOLEAN, // Omit ancestor lines off bottom of screen
15 ** "fileDiff": BOOLEAN, // True for file diff. False for check-in
 
16 ** "nrail": INTEGER, // Number of vertical "rails"
17 ** "baseUrl": TEXT, // Top-level URL
18 ** "rowinfo": ROWINFO-ARRAY }
19 **
20 ** The rowinfo field is an array of structures, one per entry in the timeline,
@@ -347,11 +348,13 @@
347 }
348 setTimeout(checkHeight, 1000);
349 }
350 initGraph();
351 checkHeight();
352 scrollToSelected();
 
 
353
354 /* Set the onclick= attributes for elements of the "Compact" display
355 ** mode so that clicking turns the details on and off.
356 */
357 var lx = topObj.getElementsByClassName('timelineEllipsis');
358
--- src/graph.js
+++ src/graph.js
@@ -11,10 +11,11 @@
11 ** "colorGraph": BOOLEAN, // True to put color on graph lines
12 ** "nomo": BOOLEAN, // True to join merge lines with rails
13 ** "iTopRow": INTEGER, // Index of top-most row in the graph
14 ** "omitDescenders": BOOLEAN, // Omit ancestor lines off bottom of screen
15 ** "fileDiff": BOOLEAN, // True for file diff. False for check-in
16 ** "scrollToSelect": BOOLEAN, // Scroll to selection on first render
17 ** "nrail": INTEGER, // Number of vertical "rails"
18 ** "baseUrl": TEXT, // Top-level URL
19 ** "rowinfo": ROWINFO-ARRAY }
20 **
21 ** The rowinfo field is an array of structures, one per entry in the timeline,
@@ -347,11 +348,13 @@
348 }
349 setTimeout(checkHeight, 1000);
350 }
351 initGraph();
352 checkHeight();
353 if( tx.scrollToSelect ){
354 scrollToSelected();
355 }
356
357 /* Set the onclick= attributes for elements of the "Compact" display
358 ** mode so that clicking turns the details on and off.
359 */
360 var lx = topObj.getElementsByClassName('timelineEllipsis');
361
+8 -4
--- src/info.c
+++ src/info.c
@@ -270,11 +270,12 @@
270270
"INSERT OR IGNORE INTO ok SELECT cid FROM plink WHERE pid=%d;", rid
271271
);
272272
}
273273
blob_append_sql(&sql, " AND event.objid IN ok ORDER BY mtime DESC");
274274
db_prepare(&q, "%s", blob_sql_text(&sql));
275
- www_print_timeline(&q, TIMELINE_DISJOINT|TIMELINE_GRAPH, 0, 0, rid, 0);
275
+ www_print_timeline(&q, TIMELINE_DISJOINT|TIMELINE_GRAPH|TIMELINE_NOSCROLL,
276
+ 0, 0, rid, 0);
276277
db_finalize(&q);
277278
}
278279
279280
/*
280281
** Show a graph all wiki, tickets, and check-ins that refer to object zUuid.
@@ -300,11 +301,12 @@
300301
if( zLabel ) cgi_printf("%s", zLabel);
301302
blob_zero(&sql);
302303
blob_append(&sql, timeline_query_for_www(), -1);
303304
blob_append_sql(&sql, " AND event.objid IN ok ORDER BY mtime DESC");
304305
db_prepare(&q, "%s", blob_sql_text(&sql));
305
- www_print_timeline(&q, TIMELINE_DISJOINT|TIMELINE_GRAPH, 0, 0, 0, 0);
306
+ www_print_timeline(&q, TIMELINE_DISJOINT|TIMELINE_GRAPH|TIMELINE_NOSCROLL,
307
+ 0, 0, 0, 0);
306308
db_finalize(&q);
307309
}
308310
309311
/*
310312
** WEBPAGE: test-backlinks
@@ -332,11 +334,12 @@
332334
);
333335
blob_zero(&sql);
334336
blob_append(&sql, timeline_query_for_www(), -1);
335337
blob_append_sql(&sql, " AND event.objid IN ok ORDER BY mtime DESC");
336338
db_prepare(&q, "%s", blob_sql_text(&sql));
337
- www_print_timeline(&q, TIMELINE_DISJOINT|TIMELINE_GRAPH, 0, 0, 0, 0);
339
+ www_print_timeline(&q, TIMELINE_DISJOINT|TIMELINE_GRAPH|TIMELINE_NOSCROLL,
340
+ 0, 0, 0, 0);
338341
db_finalize(&q);
339342
style_footer();
340343
}
341344
342345
@@ -600,11 +603,12 @@
600603
);
601604
blob_zero(&sql);
602605
blob_append(&sql, timeline_query_for_www(), -1);
603606
blob_append_sql(&sql, " AND event.objid IN ok ORDER BY mtime DESC");
604607
db_prepare(&q, "%s", blob_sql_text(&sql));
605
- www_print_timeline(&q, TIMELINE_DISJOINT|TIMELINE_GRAPH, 0, 0, rid, 0);
608
+ www_print_timeline(&q, TIMELINE_DISJOINT|TIMELINE_GRAPH|TIMELINE_NOSCROLL,
609
+ 0, 0, rid, 0);
606610
db_finalize(&q);
607611
style_footer();
608612
}
609613
610614
/*
611615
--- src/info.c
+++ src/info.c
@@ -270,11 +270,12 @@
270 "INSERT OR IGNORE INTO ok SELECT cid FROM plink WHERE pid=%d;", rid
271 );
272 }
273 blob_append_sql(&sql, " AND event.objid IN ok ORDER BY mtime DESC");
274 db_prepare(&q, "%s", blob_sql_text(&sql));
275 www_print_timeline(&q, TIMELINE_DISJOINT|TIMELINE_GRAPH, 0, 0, rid, 0);
 
276 db_finalize(&q);
277 }
278
279 /*
280 ** Show a graph all wiki, tickets, and check-ins that refer to object zUuid.
@@ -300,11 +301,12 @@
300 if( zLabel ) cgi_printf("%s", zLabel);
301 blob_zero(&sql);
302 blob_append(&sql, timeline_query_for_www(), -1);
303 blob_append_sql(&sql, " AND event.objid IN ok ORDER BY mtime DESC");
304 db_prepare(&q, "%s", blob_sql_text(&sql));
305 www_print_timeline(&q, TIMELINE_DISJOINT|TIMELINE_GRAPH, 0, 0, 0, 0);
 
306 db_finalize(&q);
307 }
308
309 /*
310 ** WEBPAGE: test-backlinks
@@ -332,11 +334,12 @@
332 );
333 blob_zero(&sql);
334 blob_append(&sql, timeline_query_for_www(), -1);
335 blob_append_sql(&sql, " AND event.objid IN ok ORDER BY mtime DESC");
336 db_prepare(&q, "%s", blob_sql_text(&sql));
337 www_print_timeline(&q, TIMELINE_DISJOINT|TIMELINE_GRAPH, 0, 0, 0, 0);
 
338 db_finalize(&q);
339 style_footer();
340 }
341
342
@@ -600,11 +603,12 @@
600 );
601 blob_zero(&sql);
602 blob_append(&sql, timeline_query_for_www(), -1);
603 blob_append_sql(&sql, " AND event.objid IN ok ORDER BY mtime DESC");
604 db_prepare(&q, "%s", blob_sql_text(&sql));
605 www_print_timeline(&q, TIMELINE_DISJOINT|TIMELINE_GRAPH, 0, 0, rid, 0);
 
606 db_finalize(&q);
607 style_footer();
608 }
609
610 /*
611
--- src/info.c
+++ src/info.c
@@ -270,11 +270,12 @@
270 "INSERT OR IGNORE INTO ok SELECT cid FROM plink WHERE pid=%d;", rid
271 );
272 }
273 blob_append_sql(&sql, " AND event.objid IN ok ORDER BY mtime DESC");
274 db_prepare(&q, "%s", blob_sql_text(&sql));
275 www_print_timeline(&q, TIMELINE_DISJOINT|TIMELINE_GRAPH|TIMELINE_NOSCROLL,
276 0, 0, rid, 0);
277 db_finalize(&q);
278 }
279
280 /*
281 ** Show a graph all wiki, tickets, and check-ins that refer to object zUuid.
@@ -300,11 +301,12 @@
301 if( zLabel ) cgi_printf("%s", zLabel);
302 blob_zero(&sql);
303 blob_append(&sql, timeline_query_for_www(), -1);
304 blob_append_sql(&sql, " AND event.objid IN ok ORDER BY mtime DESC");
305 db_prepare(&q, "%s", blob_sql_text(&sql));
306 www_print_timeline(&q, TIMELINE_DISJOINT|TIMELINE_GRAPH|TIMELINE_NOSCROLL,
307 0, 0, 0, 0);
308 db_finalize(&q);
309 }
310
311 /*
312 ** WEBPAGE: test-backlinks
@@ -332,11 +334,12 @@
334 );
335 blob_zero(&sql);
336 blob_append(&sql, timeline_query_for_www(), -1);
337 blob_append_sql(&sql, " AND event.objid IN ok ORDER BY mtime DESC");
338 db_prepare(&q, "%s", blob_sql_text(&sql));
339 www_print_timeline(&q, TIMELINE_DISJOINT|TIMELINE_GRAPH|TIMELINE_NOSCROLL,
340 0, 0, 0, 0);
341 db_finalize(&q);
342 style_footer();
343 }
344
345
@@ -600,11 +603,12 @@
603 );
604 blob_zero(&sql);
605 blob_append(&sql, timeline_query_for_www(), -1);
606 blob_append_sql(&sql, " AND event.objid IN ok ORDER BY mtime DESC");
607 db_prepare(&q, "%s", blob_sql_text(&sql));
608 www_print_timeline(&q, TIMELINE_DISJOINT|TIMELINE_GRAPH|TIMELINE_NOSCROLL,
609 0, 0, rid, 0);
610 db_finalize(&q);
611 style_footer();
612 }
613
614 /*
615
+29 -23
--- src/timeline.c
+++ src/timeline.c
@@ -91,27 +91,29 @@
9191
9292
/*
9393
** Allowed flags for the tmFlags argument to www_print_timeline
9494
*/
9595
#if INTERFACE
96
-#define TIMELINE_ARTID 0x0001 /* Show artifact IDs on non-check-in lines */
97
-#define TIMELINE_LEAFONLY 0x0002 /* Show "Leaf", but not "Merge", "Fork" etc */
98
-#define TIMELINE_BRIEF 0x0004 /* Combine adjacent elements of same object */
99
-#define TIMELINE_GRAPH 0x0008 /* Compute a graph */
100
-#define TIMELINE_DISJOINT 0x0010 /* Elements are not contiguous */
101
-#define TIMELINE_FCHANGES 0x0020 /* Detail file changes */
102
-#define TIMELINE_BRCOLOR 0x0040 /* Background color by branch name */
103
-#define TIMELINE_UCOLOR 0x0080 /* Background color by user */
104
-#define TIMELINE_FRENAMES 0x0100 /* Detail only file name changes */
105
-#define TIMELINE_UNHIDE 0x0200 /* Unhide check-ins with "hidden" tag */
106
-#define TIMELINE_SHOWRID 0x0400 /* Show RID values in addition to UUIDs */
107
-#define TIMELINE_BISECT 0x0800 /* Show supplimental bisect information */
108
-#define TIMELINE_COMPACT 0x1000 /* Use the "compact" view style */
109
-#define TIMELINE_VERBOSE 0x2000 /* Use the "detailed" view style */
110
-#define TIMELINE_MODERN 0x4000 /* Use the "modern" view style */
111
-#define TIMELINE_COLUMNAR 0x8000 /* Use the "columns view style */
112
-#define TIMELINE_VIEWS 0xf000 /* Mask for all of the view styles */
96
+#define TIMELINE_ARTID 0x00001 /* Show artifact IDs on non-check-in lines */
97
+#define TIMELINE_LEAFONLY 0x00002 /* Show "Leaf" but not "Merge", "Fork" etc */
98
+#define TIMELINE_BRIEF 0x00004 /* Combine adjacent elements of same obj */
99
+#define TIMELINE_GRAPH 0x00008 /* Compute a graph */
100
+#define TIMELINE_DISJOINT 0x00010 /* Elements are not contiguous */
101
+#define TIMELINE_FCHANGES 0x00020 /* Detail file changes */
102
+#define TIMELINE_BRCOLOR 0x00040 /* Background color by branch name */
103
+#define TIMELINE_UCOLOR 0x00080 /* Background color by user */
104
+#define TIMELINE_FRENAMES 0x00100 /* Detail only file name changes */
105
+#define TIMELINE_UNHIDE 0x00200 /* Unhide check-ins with "hidden" tag */
106
+#define TIMELINE_SHOWRID 0x00400 /* Show RID values in addition to UUIDs */
107
+#define TIMELINE_BISECT 0x00800 /* Show supplimental bisect information */
108
+#define TIMELINE_COMPACT 0x01000 /* Use the "compact" view style */
109
+#define TIMELINE_VERBOSE 0x02000 /* Use the "detailed" view style */
110
+#define TIMELINE_MODERN 0x04000 /* Use the "modern" view style */
111
+#define TIMELINE_COLUMNAR 0x08000 /* Use the "columns view style */
112
+#define TIMELINE_VIEWS 0x0f000 /* Mask for all of the view styles */
113
+#define TIMELINE_NOSCROLL 0x10000 /* Don't scroll to the selection */
114
+#define TIMELINE_FILEDIFF 0x20000 /* Show File differences, not ckin diffs */
113115
#endif
114116
115117
/*
116118
** Hash a string and use the hash to determine a background color.
117119
*/
@@ -724,12 +726,11 @@
724726
@ <tr class="timelineBottom"><td></td><td></td><td></td></tr>
725727
}
726728
}
727729
@ </table>
728730
if( fchngQueryInit ) db_finalize(&fchngQuery);
729
- timeline_output_graph_javascript(pGraph, (tmFlags & TIMELINE_DISJOINT)!=0,
730
- iTableId, 0);
731
+ timeline_output_graph_javascript(pGraph, tmFlags, iTableId);
731732
}
732733
733734
/*
734735
** Change the RGB background color given in the argument in a foreground
735736
** color with the same hue.
@@ -765,13 +766,12 @@
765766
** Generate all of the necessary javascript to generate a timeline
766767
** graph.
767768
*/
768769
void timeline_output_graph_javascript(
769770
GraphContext *pGraph, /* The graph to be displayed */
770
- int omitDescenders, /* True to omit descenders */
771
- int iTableId, /* Which graph is this for */
772
- int fileDiff /* True for file diff. False for check-in diff */
771
+ int tmFlags, /* Flags that control rendering */
772
+ int iTableId /* Which graph is this for */
773773
){
774774
if( pGraph && pGraph->nErr==0 && pGraph->nRow>0 ){
775775
GraphRow *pRow;
776776
int i;
777777
char cSep;
@@ -778,17 +778,22 @@
778778
int iRailPitch; /* Pixels between consecutive rails */
779779
int showArrowheads; /* True to draw arrowheads. False to omit. */
780780
int circleNodes; /* True for circle nodes. False for square nodes */
781781
int colorGraph; /* Use colors for graph lines */
782782
int iTopRow; /* Index of the top row of the graph */
783
+ int fileDiff; /* True for file diff. False for check-in diff */
784
+ int omitDescenders; /* True to omit descenders */
785
+ int scrollToSelect; /* True to scroll to the selection */
783786
784787
iRailPitch = atoi(PD("railpitch","0"));
785788
showArrowheads = skin_detail_boolean("timeline-arrowheads");
786789
circleNodes = skin_detail_boolean("timeline-circle-nodes");
787790
colorGraph = skin_detail_boolean("timeline-color-graph-lines");
788791
iTopRow = pGraph->pFirst ? pGraph->pFirst->idx : 0;
789
-
792
+ omitDescenders = (tmFlags & TIMELINE_DISJOINT)!=0;
793
+ fileDiff = (tmFlags & TIMELINE_FILEDIFF)!=0;
794
+ scrollToSelect = (tmFlags & TIMELINE_NOSCROLL)==0;
790795
@ <script id='timeline-data-%d(iTableId)' type='application/json'>{
791796
@ "iTableId": %d(iTableId),
792797
@ "circleNodes": %d(circleNodes),
793798
@ "showArrowheads": %d(showArrowheads),
794799
@ "iRailPitch": %d(iRailPitch),
@@ -795,10 +800,11 @@
795800
@ "colorGraph": %d(colorGraph),
796801
@ "nomo": %d(PB("nomo")),
797802
@ "iTopRow": %d(iTopRow),
798803
@ "omitDescenders": %d(omitDescenders),
799804
@ "fileDiff": %d(fileDiff),
805
+ @ "scrollToSelect": %d(scrollToSelect),
800806
@ "nrail": %d(pGraph->mxRail+1),
801807
@ "baseUrl": "%R",
802808
@ "rowinfo": [
803809
804810
/* the rowinfo[] array contains all the information needed to generate
805811
--- src/timeline.c
+++ src/timeline.c
@@ -91,27 +91,29 @@
91
92 /*
93 ** Allowed flags for the tmFlags argument to www_print_timeline
94 */
95 #if INTERFACE
96 #define TIMELINE_ARTID 0x0001 /* Show artifact IDs on non-check-in lines */
97 #define TIMELINE_LEAFONLY 0x0002 /* Show "Leaf", but not "Merge", "Fork" etc */
98 #define TIMELINE_BRIEF 0x0004 /* Combine adjacent elements of same object */
99 #define TIMELINE_GRAPH 0x0008 /* Compute a graph */
100 #define TIMELINE_DISJOINT 0x0010 /* Elements are not contiguous */
101 #define TIMELINE_FCHANGES 0x0020 /* Detail file changes */
102 #define TIMELINE_BRCOLOR 0x0040 /* Background color by branch name */
103 #define TIMELINE_UCOLOR 0x0080 /* Background color by user */
104 #define TIMELINE_FRENAMES 0x0100 /* Detail only file name changes */
105 #define TIMELINE_UNHIDE 0x0200 /* Unhide check-ins with "hidden" tag */
106 #define TIMELINE_SHOWRID 0x0400 /* Show RID values in addition to UUIDs */
107 #define TIMELINE_BISECT 0x0800 /* Show supplimental bisect information */
108 #define TIMELINE_COMPACT 0x1000 /* Use the "compact" view style */
109 #define TIMELINE_VERBOSE 0x2000 /* Use the "detailed" view style */
110 #define TIMELINE_MODERN 0x4000 /* Use the "modern" view style */
111 #define TIMELINE_COLUMNAR 0x8000 /* Use the "columns view style */
112 #define TIMELINE_VIEWS 0xf000 /* Mask for all of the view styles */
 
 
113 #endif
114
115 /*
116 ** Hash a string and use the hash to determine a background color.
117 */
@@ -724,12 +726,11 @@
724 @ <tr class="timelineBottom"><td></td><td></td><td></td></tr>
725 }
726 }
727 @ </table>
728 if( fchngQueryInit ) db_finalize(&fchngQuery);
729 timeline_output_graph_javascript(pGraph, (tmFlags & TIMELINE_DISJOINT)!=0,
730 iTableId, 0);
731 }
732
733 /*
734 ** Change the RGB background color given in the argument in a foreground
735 ** color with the same hue.
@@ -765,13 +766,12 @@
765 ** Generate all of the necessary javascript to generate a timeline
766 ** graph.
767 */
768 void timeline_output_graph_javascript(
769 GraphContext *pGraph, /* The graph to be displayed */
770 int omitDescenders, /* True to omit descenders */
771 int iTableId, /* Which graph is this for */
772 int fileDiff /* True for file diff. False for check-in diff */
773 ){
774 if( pGraph && pGraph->nErr==0 && pGraph->nRow>0 ){
775 GraphRow *pRow;
776 int i;
777 char cSep;
@@ -778,17 +778,22 @@
778 int iRailPitch; /* Pixels between consecutive rails */
779 int showArrowheads; /* True to draw arrowheads. False to omit. */
780 int circleNodes; /* True for circle nodes. False for square nodes */
781 int colorGraph; /* Use colors for graph lines */
782 int iTopRow; /* Index of the top row of the graph */
 
 
 
783
784 iRailPitch = atoi(PD("railpitch","0"));
785 showArrowheads = skin_detail_boolean("timeline-arrowheads");
786 circleNodes = skin_detail_boolean("timeline-circle-nodes");
787 colorGraph = skin_detail_boolean("timeline-color-graph-lines");
788 iTopRow = pGraph->pFirst ? pGraph->pFirst->idx : 0;
789
 
 
790 @ <script id='timeline-data-%d(iTableId)' type='application/json'>{
791 @ "iTableId": %d(iTableId),
792 @ "circleNodes": %d(circleNodes),
793 @ "showArrowheads": %d(showArrowheads),
794 @ "iRailPitch": %d(iRailPitch),
@@ -795,10 +800,11 @@
795 @ "colorGraph": %d(colorGraph),
796 @ "nomo": %d(PB("nomo")),
797 @ "iTopRow": %d(iTopRow),
798 @ "omitDescenders": %d(omitDescenders),
799 @ "fileDiff": %d(fileDiff),
 
800 @ "nrail": %d(pGraph->mxRail+1),
801 @ "baseUrl": "%R",
802 @ "rowinfo": [
803
804 /* the rowinfo[] array contains all the information needed to generate
805
--- src/timeline.c
+++ src/timeline.c
@@ -91,27 +91,29 @@
91
92 /*
93 ** Allowed flags for the tmFlags argument to www_print_timeline
94 */
95 #if INTERFACE
96 #define TIMELINE_ARTID 0x00001 /* Show artifact IDs on non-check-in lines */
97 #define TIMELINE_LEAFONLY 0x00002 /* Show "Leaf" but not "Merge", "Fork" etc */
98 #define TIMELINE_BRIEF 0x00004 /* Combine adjacent elements of same obj */
99 #define TIMELINE_GRAPH 0x00008 /* Compute a graph */
100 #define TIMELINE_DISJOINT 0x00010 /* Elements are not contiguous */
101 #define TIMELINE_FCHANGES 0x00020 /* Detail file changes */
102 #define TIMELINE_BRCOLOR 0x00040 /* Background color by branch name */
103 #define TIMELINE_UCOLOR 0x00080 /* Background color by user */
104 #define TIMELINE_FRENAMES 0x00100 /* Detail only file name changes */
105 #define TIMELINE_UNHIDE 0x00200 /* Unhide check-ins with "hidden" tag */
106 #define TIMELINE_SHOWRID 0x00400 /* Show RID values in addition to UUIDs */
107 #define TIMELINE_BISECT 0x00800 /* Show supplimental bisect information */
108 #define TIMELINE_COMPACT 0x01000 /* Use the "compact" view style */
109 #define TIMELINE_VERBOSE 0x02000 /* Use the "detailed" view style */
110 #define TIMELINE_MODERN 0x04000 /* Use the "modern" view style */
111 #define TIMELINE_COLUMNAR 0x08000 /* Use the "columns view style */
112 #define TIMELINE_VIEWS 0x0f000 /* Mask for all of the view styles */
113 #define TIMELINE_NOSCROLL 0x10000 /* Don't scroll to the selection */
114 #define TIMELINE_FILEDIFF 0x20000 /* Show File differences, not ckin diffs */
115 #endif
116
117 /*
118 ** Hash a string and use the hash to determine a background color.
119 */
@@ -724,12 +726,11 @@
726 @ <tr class="timelineBottom"><td></td><td></td><td></td></tr>
727 }
728 }
729 @ </table>
730 if( fchngQueryInit ) db_finalize(&fchngQuery);
731 timeline_output_graph_javascript(pGraph, tmFlags, iTableId);
 
732 }
733
734 /*
735 ** Change the RGB background color given in the argument in a foreground
736 ** color with the same hue.
@@ -765,13 +766,12 @@
766 ** Generate all of the necessary javascript to generate a timeline
767 ** graph.
768 */
769 void timeline_output_graph_javascript(
770 GraphContext *pGraph, /* The graph to be displayed */
771 int tmFlags, /* Flags that control rendering */
772 int iTableId /* Which graph is this for */
 
773 ){
774 if( pGraph && pGraph->nErr==0 && pGraph->nRow>0 ){
775 GraphRow *pRow;
776 int i;
777 char cSep;
@@ -778,17 +778,22 @@
778 int iRailPitch; /* Pixels between consecutive rails */
779 int showArrowheads; /* True to draw arrowheads. False to omit. */
780 int circleNodes; /* True for circle nodes. False for square nodes */
781 int colorGraph; /* Use colors for graph lines */
782 int iTopRow; /* Index of the top row of the graph */
783 int fileDiff; /* True for file diff. False for check-in diff */
784 int omitDescenders; /* True to omit descenders */
785 int scrollToSelect; /* True to scroll to the selection */
786
787 iRailPitch = atoi(PD("railpitch","0"));
788 showArrowheads = skin_detail_boolean("timeline-arrowheads");
789 circleNodes = skin_detail_boolean("timeline-circle-nodes");
790 colorGraph = skin_detail_boolean("timeline-color-graph-lines");
791 iTopRow = pGraph->pFirst ? pGraph->pFirst->idx : 0;
792 omitDescenders = (tmFlags & TIMELINE_DISJOINT)!=0;
793 fileDiff = (tmFlags & TIMELINE_FILEDIFF)!=0;
794 scrollToSelect = (tmFlags & TIMELINE_NOSCROLL)==0;
795 @ <script id='timeline-data-%d(iTableId)' type='application/json'>{
796 @ "iTableId": %d(iTableId),
797 @ "circleNodes": %d(circleNodes),
798 @ "showArrowheads": %d(showArrowheads),
799 @ "iRailPitch": %d(iRailPitch),
@@ -795,10 +800,11 @@
800 @ "colorGraph": %d(colorGraph),
801 @ "nomo": %d(PB("nomo")),
802 @ "iTopRow": %d(iTopRow),
803 @ "omitDescenders": %d(omitDescenders),
804 @ "fileDiff": %d(fileDiff),
805 @ "scrollToSelect": %d(scrollToSelect),
806 @ "nrail": %d(pGraph->mxRail+1),
807 @ "baseUrl": "%R",
808 @ "rowinfo": [
809
810 /* the rowinfo[] array contains all the information needed to generate
811

Keyboard Shortcuts

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