Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | New timeline formatting experiment. Foreground font color changes when mousing over the vinfo hyperline show all immediate parents in red and immediate children in green and hide all entries that are not part of the current line. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
4d051c1eda312ef2be17c7f254c54a8d |
| User & Date: | drh 2007-08-29 11:48:58.000 |
Context
|
2007-08-29
| ||
| 11:51 | Merge aku's makefile changes. ... (check-in: fad606934c user: drh tags: trunk) | |
| 11:48 | New timeline formatting experiment. Foreground font color changes when mousing over the vinfo hyperline show all immediate parents in red and immediate children in green and hide all entries that are not part of the current line. ... (check-in: 4d051c1eda user: drh tags: trunk) | |
| 03:22 | Patch up makemake.tcl to incorporate aku's edits, then regenerate the main.mk file. ... (check-in: b616c3d8c3 user: drh tags: trunk) | |
Changes
Changes to src/timeline.c.
| ︙ | ︙ | |||
40 41 42 43 44 45 46 | } } /* ** Generate a hyperlink that invokes javascript to highlight ** a version on mouseover. */ | | > > > > > | | | 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
}
}
/*
** Generate a hyperlink that invokes javascript to highlight
** a version on mouseover.
*/
void hyperlink_to_uuid_with_mouseover(
const char *zUuid, /* The UUID to display */
const char *zIn, /* Javascript proc for mouseover */
const char *zOut, /* Javascript proc for mouseout */
int id /* Argument to javascript procs */
){
char zShortUuid[UUID_SIZE+1];
sprintf(zShortUuid, "%.10s", zUuid);
if( g.okHistory ){
@ <a onmouseover='%s(zIn)("m%d(id)")' onmouseout='%s(zOut)("m%d(id)")'
@ href="%s(g.zBaseURL)/vinfo/%s(zUuid)">[%s(zShortUuid)]</a>
}else{
@ <b onmouseover='%s(zIn)("m%d(id)")' onmouseout='%s(zOut)("m%d(id)")'>
@ [%s(zShortUuid)]</b>
}
}
/*
** Generate a hyperlink to a diff between two versions.
*/
|
| ︙ | ︙ | |||
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 |
Blob *pArg
){
char zPrevDate[20];
zPrevDate[0] = 0;
@ <table cellspacing=0 border=0 cellpadding=0>
while( db_step(pQuery)==SQLITE_ROW ){
int rid = db_column_int(pQuery, 0);
int nPChild = db_column_int(pQuery, 5);
int nParent = db_column_int(pQuery, 6);
int isLeaf = db_column_int(pQuery, 7);
const char *zDate = db_column_text(pQuery, 2);
if( xCallback ){
xCallback(rid, pArg);
}
if( memcmp(zDate, zPrevDate, 10) ){
sprintf(zPrevDate, "%.10s", zDate);
@ <tr><td colspan=3>
@ <table cellpadding=2 border=0>
@ <tr><td bgcolor="#a0b5f4" class="border1">
@ <table cellpadding=2 cellspacing=0 border=0><tr>
@ <td bgcolor="#d0d9f4" class="bkgnd1">%s(zPrevDate)</td>
@ </tr></table>
@ </td></tr></table>
@ </td></tr>
}
| > | < | < < | < < < < < < < < < | < < < | < < < < < < < < < < < > | 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 |
Blob *pArg
){
char zPrevDate[20];
zPrevDate[0] = 0;
@ <table cellspacing=0 border=0 cellpadding=0>
while( db_step(pQuery)==SQLITE_ROW ){
int rid = db_column_int(pQuery, 0);
const char *zUuid = db_column_text(pQuery, 1);
int nPChild = db_column_int(pQuery, 5);
int nParent = db_column_int(pQuery, 6);
int isLeaf = db_column_int(pQuery, 7);
const char *zDate = db_column_text(pQuery, 2);
if( xCallback ){
xCallback(rid, pArg);
}
if( memcmp(zDate, zPrevDate, 10) ){
sprintf(zPrevDate, "%.10s", zDate);
@ <tr><td colspan=3>
@ <table cellpadding=2 border=0>
@ <tr><td bgcolor="#a0b5f4" class="border1">
@ <table cellpadding=2 cellspacing=0 border=0><tr>
@ <td bgcolor="#d0d9f4" class="bkgnd1">%s(zPrevDate)</td>
@ </tr></table>
@ </td></tr></table>
@ </td></tr>
}
@ <tr id="m%d(rid)">
@ <td valign="top">%s(&zDate[11])</td>
@ <td width="20"></td>
@ <td valign="top" align="left">
hyperlink_to_uuid_with_mouseover(zUuid, "xin", "xout", rid);
if( nParent>1 ){
@ <b>Merge</b>
}
if( nPChild>1 ){
@ <b>Fork</b>
}
if( isLeaf ){
@ <b>Leaf</b>
}
@ %h(db_column_text(pQuery,3))
@ (by %h(db_column_text(pQuery,4)))</td></tr>
if( zLastDate ){
strcpy(zLastDate, zDate);
}
}
@ </table>
}
|
| ︙ | ︙ | |||
245 246 247 248 249 250 251 |
cgi_append_content(blob_buffer(&scriptInit), blob_size(&scriptInit));
blob_reset(&scriptInit);
@ function setall(value){
@ for(var x in parentof){
@ setone(x,value);
@ }
@ }
| | < | | | | | | > > > > > > > > > > > > > > | | | | | | | < < < < < < < < | 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 |
cgi_append_content(blob_buffer(&scriptInit), blob_size(&scriptInit));
blob_reset(&scriptInit);
@ function setall(value){
@ for(var x in parentof){
@ setone(x,value);
@ }
@ }
@ function setone(id, clr){
@ if( parentof[id]==null ) return 0;
@ var w = document.getElementById(id);
@ if( w.style.color==clr ){
@ return 0
@ }else{
@ w.style.color = clr
@ return 1
@ }
@ }
@ function xin(id) {
@ setall("#ffffff");
@ setone(id,"#000000");
@ set_children(id, "#002000");
@ set_parents(id, "#200000");
@ for(var x in parentof[id]){
@ var pid = parentof[id][x]
@ var w = document.getElementById(pid);
@ if( w!=null ){
@ w.style.color = "#ff0000";
@ }
@ }
@ for(var x in childof[id]){
@ var cid = childof[id][x]
@ var w = document.getElementById(cid);
@ if( w!=null ){
@ w.style.color = "#008000";
@ }
@ }
@ }
@ function xout(id) {
@ setall("#000000");
@ }
@ function set_parents(id, clr){
@ var plist = parentof[id];
@ if( plist==null ) return;
@ for(var x in plist){
@ var pid = plist[x];
@ if( setone(pid,clr)==1 ){
@ set_parents(pid,clr);
@ }
@ }
@ }
@ function set_children(id,clr){
@ var clist = childof[id];
@ if( clist==null ) return;
@ for(var x in clist){
@ var cid = clist[x];
@ if( setone(cid,clr)==1 ){
@ set_children(cid,clr);
@ }
@ }
@ }
@ </script>
@ <hr>
@ <form method="GET" action="%s(g.zBaseURL)/timeline">
@ Start Date:
@ <input type="text" size="30" value="%h(zStart)" name="d">
@ Number Of Entries:
@ <input type="text" size="4" value="%d(nEntry)" name="n">
|
| ︙ | ︙ |