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
|
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 = tx.baseUrl + "/timeline?r=" + encodeURIComponent(br)
var dest = branchHyperlink(ix)
dest += "&c=" + encodeURIComponent(tx.rowinfo[ix].h)
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){
if( tx.fileDiff ) return
var ix = findTxIndex(e);
var br = tx.rowinfo[ix].br
var dest = "/timeline?r=" + encodeURIComponent(br)
var dest = branchHyperlink(ix)
dest += "&c=" + encodeURIComponent(tx.rowinfo[ix].h)
tooltipObj.style.display = "none"
window.location.href = tx.baseUrl + dest
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){
|