Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Improvements to branch linkage from the tooltip. Branch linkage now works even from a file history graph. And the source check-in is always highlighted in the linked timeline. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | tooltips |
| Files: | files | file ages | folders |
| SHA3-256: |
a27ca27f1de01da545e6e350b534845f |
| User & Date: | drh 2019-05-18 18:57:40.516 |
Context
|
2019-05-18
| ||
| 21:08 | Merge the windows build fix from trunk into the tooltips branch. ... (Closed-Leaf check-in: b406b41453 user: drh tags: tooltips) | |
| 20:55 | Merge the windows build fix from trunk. ... (Closed-Leaf check-in: d99debe8ee user: drh tags: bad-merge) | |
| 18:57 | Improvements to branch linkage from the tooltip. Branch linkage now works even from a file history graph. And the source check-in is always highlighted in the linked timeline. ... (check-in: a27ca27f1d user: drh tags: tooltips) | |
| 14:39 | Improvements to the default tooltip CSS so that it is readable on skins with dark backgrounds and light text. ... (check-in: d6b83f54dd user: drh tags: tooltips) | |
Changes
Changes to src/graph.js.
| ︙ | ︙ | |||
453 454 455 456 457 458 459 460 461 462 463 464 465 466 |
if( x<n.offsetLeft-5 ) continue;
if( x>n.offsetLeft+n.offsetWidth+5 ) continue;
if( y<n.offsetTop-5 ) continue;
if( y>n.offsetTop+n.offsetHeight ) continue;
return n.getAttribute("data-ix")
}
return -1
}
function clickOnGraph(e){
var ix = findTxIndex(e);
if( ix<0 ){
tooltipObj.style.display = "none"
}else{
var br = tx.rowinfo[ix].br
| > > > > > > > > | < < < | < | | 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 |
if( x<n.offsetLeft-5 ) continue;
if( x>n.offsetLeft+n.offsetWidth+5 ) continue;
if( y<n.offsetTop-5 ) continue;
if( y>n.offsetTop+n.offsetHeight ) continue;
return n.getAttribute("data-ix")
}
return -1
}
/* Compute the hyperlink for the branch graph for tx.rowinfo[ix] */
function branchHyperlink(ix){
var br = tx.rowinfo[ix].br
var dest = tx.baseUrl + "/timeline?r=" + encodeURIComponent(br)
dest += tx.fileDiff ? "&m&cf=" : "&m&c="
dest += encodeURIComponent(tx.rowinfo[ix].h)
return dest
}
function clickOnGraph(e){
var ix = findTxIndex(e);
if( ix<0 ){
tooltipObj.style.display = "none"
}else{
var br = tx.rowinfo[ix].br
var dest = branchHyperlink(ix)
var hbr = br.replace(/&/g, "&")
.replace(/</g, "<")
.replace(/>/g, ">")
.replace(/"/g, """)
.replace(/'/g, "'");
tooltipObj.innerHTML = "<a href=\""+dest+"\">"+hbr+"</a>"
tooltipObj.style.display = "inline"
tooltipObj.style.position = "absolute"
var x = e.x + 4 + window.pageXOffset
tooltipObj.style.left = x+"px"
var y = e.y + window.pageYOffset - tooltipObj.clientHeight - 4
tooltipObj.style.top = y+"px"
tooltipObj.style.visibility = "visible"
}
}
function dblclickOnGraph(e){
var ix = findTxIndex(e);
var dest = branchHyperlink(ix)
tooltipObj.style.display = "none"
window.location.href = dest
}
function changeDisplay(selector,value){
var x = document.getElementsByClassName(selector);
var n = x.length;
for(var i=0; i<n; i++) {x[i].style.display = value;}
}
function changeDisplayById(id,value){
|
| ︙ | ︙ |
Changes to src/timeline.c.
| ︙ | ︙ | |||
1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 | ** WEBPAGE: timeline ** ** Query parameters: ** ** a=TIMEORTAG After this event ** b=TIMEORTAG Before this event ** c=TIMEORTAG "Circa" this event ** m=TIMEORTAG Mark this event ** n=COUNT Maximum number of events. "all" for no limit ** p=CHECKIN Parents and ancestors of CHECKIN ** d=CHECKIN Children and descendants of CHECKIN ** dp=CHECKIN The same as d=CHECKIN&p=CHECKIN ** t=TAG Show only check-ins with the given TAG ** r=TAG Show check-ins related to TAG, equivalent to t=TAG&rel | > | 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 | ** WEBPAGE: timeline ** ** Query parameters: ** ** a=TIMEORTAG After this event ** b=TIMEORTAG Before this event ** c=TIMEORTAG "Circa" this event ** cf=FILEHASH "Circa" the first use of the file with FILEHASH ** m=TIMEORTAG Mark this event ** n=COUNT Maximum number of events. "all" for no limit ** p=CHECKIN Parents and ancestors of CHECKIN ** d=CHECKIN Children and descendants of CHECKIN ** dp=CHECKIN The same as d=CHECKIN&p=CHECKIN ** t=TAG Show only check-ins with the given TAG ** r=TAG Show check-ins related to TAG, equivalent to t=TAG&rel |
| ︙ | ︙ | |||
1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 |
}
if( zType[0]=='a' || zType[0]=='c' ){
cookie_write_parameter("y","y",zType);
}
cookie_render();
url_initialize(&url, "timeline");
cgi_query_parameters_to_url(&url);
/* Convert r=TAG to t=TAG&rel. */
if( zBrName && !related ){
cgi_delete_query_parameter("r");
cgi_set_query_parameter("t", zBrName);
cgi_set_query_parameter("rel", "1");
zTagName = zBrName;
| > > > > > > > > > > > > | 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 |
}
if( zType[0]=='a' || zType[0]=='c' ){
cookie_write_parameter("y","y",zType);
}
cookie_render();
url_initialize(&url, "timeline");
cgi_query_parameters_to_url(&url);
/* Convert the cf=FILEHASH query parameter into a c=CHECKINHASH value */
if( P("cf")!=0 ){
zCirca = db_text(0,
"SELECT (SELECT uuid FROM blob WHERE rid=mlink.mid)"
" FROM mlink, event"
" WHERE mlink.fid=(SELECT rid FROM blob WHERE uuid LIKE '%q%%')"
" AND event.objid=mlink.mid"
" ORDER BY event.mtime LIMIT 1",
P("cf")
);
}
/* Convert r=TAG to t=TAG&rel. */
if( zBrName && !related ){
cgi_delete_query_parameter("r");
cgi_set_query_parameter("t", zBrName);
cgi_set_query_parameter("rel", "1");
zTagName = zBrName;
|
| ︙ | ︙ |