Fossil SCM
Add a non-linked "type" name in front of all tooltips. Style the foreground color and border color based on the default font color.
Commit
2bfa69a3013dde35432933a0ba863eaecf0f9674e333cd14a3a6f928e211c16f
Parent
cf1f42435a38fc6…
1 file changed
+7
-7
+7
-7
| --- src/graph.js | ||
| +++ src/graph.js | ||
| @@ -594,13 +594,13 @@ | ||
| 594 | 594 | if( tooltipInfo.ixHover==-2 ){ |
| 595 | 595 | ix = parseInt(tooltipInfo.nodeHover.id.match(/\d+$/)[0],10)-tx.iTopRow |
| 596 | 596 | var h = tx.rowinfo[ix].h |
| 597 | 597 | var dest = tx.baseUrl + "/info/" + h |
| 598 | 598 | if( tx.fileDiff ){ |
| 599 | - html = "<a href=\""+dest+"\">artifact "+h+"</a>" | |
| 599 | + html = "artifact <a href=\""+dest+"\">"+h+"</a>" | |
| 600 | 600 | }else{ |
| 601 | - html = "<a href=\""+dest+"\">check-in "+h+"</a>" | |
| 601 | + html = "check-in <a href=\""+dest+"\">"+h+"</a>" | |
| 602 | 602 | } |
| 603 | 603 | }else if( tooltipInfo.ixHover>=0 ){ |
| 604 | 604 | ix = tooltipInfo.ixHover |
| 605 | 605 | var br = tx.rowinfo[ix].br |
| 606 | 606 | var dest = branchHyperlink(ix) |
| @@ -607,23 +607,23 @@ | ||
| 607 | 607 | var hbr = br.replace(/&/g, "&") |
| 608 | 608 | .replace(/</g, "<") |
| 609 | 609 | .replace(/>/g, ">") |
| 610 | 610 | .replace(/"/g, """) |
| 611 | 611 | .replace(/'/g, "'"); |
| 612 | - html = "<a href=\""+dest+"\">"+hbr+"</a>" | |
| 612 | + html = "branch <a href=\""+dest+"\">"+hbr+"</a>" | |
| 613 | 613 | tooltipInfo.ixActive = ix; |
| 614 | 614 | } |
| 615 | 615 | if( html ){ |
| 616 | 616 | /* Setup while hidden, to ensure proper dimensions. */ |
| 617 | + var s = getComputedStyle(document.body) | |
| 617 | 618 | if( tx.rowinfo[ix].bg.length ){ |
| 618 | 619 | tooltipObj.style.backgroundColor = tx.rowinfo[ix].bg |
| 619 | 620 | }else{ |
| 620 | - tooltipObj.style.backgroundColor = | |
| 621 | - getComputedStyle(document.body).getPropertyValue('background-color') | |
| 621 | + tooltipObj.style.backgroundColor = s.getPropertyValue('background-color') | |
| 622 | 622 | } |
| 623 | - tooltipObj.style.color = tx.rowinfo[ix].fg | |
| 624 | - | |
| 623 | + tooltipObj.style.borderColor = | |
| 624 | + tooltipObj.style.color = s.getPropertyValue('color') | |
| 625 | 625 | tooltipObj.style.visibility = "hidden" |
| 626 | 626 | tooltipObj.innerHTML = html |
| 627 | 627 | tooltipObj.style.display = "inline" |
| 628 | 628 | tooltipObj.style.position = "absolute" |
| 629 | 629 | var x = tooltipInfo.posX + 4 + window.pageXOffset |
| 630 | 630 |
| --- src/graph.js | |
| +++ src/graph.js | |
| @@ -594,13 +594,13 @@ | |
| 594 | if( tooltipInfo.ixHover==-2 ){ |
| 595 | ix = parseInt(tooltipInfo.nodeHover.id.match(/\d+$/)[0],10)-tx.iTopRow |
| 596 | var h = tx.rowinfo[ix].h |
| 597 | var dest = tx.baseUrl + "/info/" + h |
| 598 | if( tx.fileDiff ){ |
| 599 | html = "<a href=\""+dest+"\">artifact "+h+"</a>" |
| 600 | }else{ |
| 601 | html = "<a href=\""+dest+"\">check-in "+h+"</a>" |
| 602 | } |
| 603 | }else if( tooltipInfo.ixHover>=0 ){ |
| 604 | ix = tooltipInfo.ixHover |
| 605 | var br = tx.rowinfo[ix].br |
| 606 | var dest = branchHyperlink(ix) |
| @@ -607,23 +607,23 @@ | |
| 607 | var hbr = br.replace(/&/g, "&") |
| 608 | .replace(/</g, "<") |
| 609 | .replace(/>/g, ">") |
| 610 | .replace(/"/g, """) |
| 611 | .replace(/'/g, "'"); |
| 612 | html = "<a href=\""+dest+"\">"+hbr+"</a>" |
| 613 | tooltipInfo.ixActive = ix; |
| 614 | } |
| 615 | if( html ){ |
| 616 | /* Setup while hidden, to ensure proper dimensions. */ |
| 617 | if( tx.rowinfo[ix].bg.length ){ |
| 618 | tooltipObj.style.backgroundColor = tx.rowinfo[ix].bg |
| 619 | }else{ |
| 620 | tooltipObj.style.backgroundColor = |
| 621 | getComputedStyle(document.body).getPropertyValue('background-color') |
| 622 | } |
| 623 | tooltipObj.style.color = tx.rowinfo[ix].fg |
| 624 | |
| 625 | tooltipObj.style.visibility = "hidden" |
| 626 | tooltipObj.innerHTML = html |
| 627 | tooltipObj.style.display = "inline" |
| 628 | tooltipObj.style.position = "absolute" |
| 629 | var x = tooltipInfo.posX + 4 + window.pageXOffset |
| 630 |
| --- src/graph.js | |
| +++ src/graph.js | |
| @@ -594,13 +594,13 @@ | |
| 594 | if( tooltipInfo.ixHover==-2 ){ |
| 595 | ix = parseInt(tooltipInfo.nodeHover.id.match(/\d+$/)[0],10)-tx.iTopRow |
| 596 | var h = tx.rowinfo[ix].h |
| 597 | var dest = tx.baseUrl + "/info/" + h |
| 598 | if( tx.fileDiff ){ |
| 599 | html = "artifact <a href=\""+dest+"\">"+h+"</a>" |
| 600 | }else{ |
| 601 | html = "check-in <a href=\""+dest+"\">"+h+"</a>" |
| 602 | } |
| 603 | }else if( tooltipInfo.ixHover>=0 ){ |
| 604 | ix = tooltipInfo.ixHover |
| 605 | var br = tx.rowinfo[ix].br |
| 606 | var dest = branchHyperlink(ix) |
| @@ -607,23 +607,23 @@ | |
| 607 | var hbr = br.replace(/&/g, "&") |
| 608 | .replace(/</g, "<") |
| 609 | .replace(/>/g, ">") |
| 610 | .replace(/"/g, """) |
| 611 | .replace(/'/g, "'"); |
| 612 | html = "branch <a href=\""+dest+"\">"+hbr+"</a>" |
| 613 | tooltipInfo.ixActive = ix; |
| 614 | } |
| 615 | if( html ){ |
| 616 | /* Setup while hidden, to ensure proper dimensions. */ |
| 617 | var s = getComputedStyle(document.body) |
| 618 | if( tx.rowinfo[ix].bg.length ){ |
| 619 | tooltipObj.style.backgroundColor = tx.rowinfo[ix].bg |
| 620 | }else{ |
| 621 | tooltipObj.style.backgroundColor = s.getPropertyValue('background-color') |
| 622 | } |
| 623 | tooltipObj.style.borderColor = |
| 624 | tooltipObj.style.color = s.getPropertyValue('color') |
| 625 | tooltipObj.style.visibility = "hidden" |
| 626 | tooltipObj.innerHTML = html |
| 627 | tooltipObj.style.display = "inline" |
| 628 | tooltipObj.style.position = "absolute" |
| 629 | var x = tooltipInfo.posX + 4 + window.pageXOffset |
| 630 |