mirror of
https://github.com/klaussilveira/gitlist.git
synced 2025-11-17 03:00:59 +01:00
Click handler for the commit dots
This commit is contained in:
@@ -43,11 +43,15 @@ class NetworkController implements ControllerProviderInterface
|
||||
$jsonFormattedCommits = array();
|
||||
|
||||
foreach( $commits as $commit ) {
|
||||
$detailsUrl = $app['url_generator']->generate('commit', array( 'repo' => $repo,
|
||||
'commit'=>$commit->getHash()));
|
||||
|
||||
$jsonFormattedCommits[$commit->getHash()] = array(
|
||||
'hash' => $commit->getHash(),
|
||||
'parentsHash' => $commit->getParentsHash(),
|
||||
'date' => $commit->getDate()->format('U'),
|
||||
'message' => htmlentities( $commit->getMessage() ),
|
||||
'details' => $detailsUrl,
|
||||
'author' => array(
|
||||
'name' => $commit->getAuthor()->getName(),
|
||||
'email' => $commit->getAuthor()->getEmail(),
|
||||
|
||||
@@ -465,7 +465,8 @@
|
||||
})
|
||||
.data('commit', commit)
|
||||
.mouseover( handleCommitMouseover )
|
||||
.mouseout( handleCommitMouseout);
|
||||
.mouseout( handleCommitMouseout )
|
||||
.click( handleCommitClick );
|
||||
|
||||
$.each( commit.children, function ( idx, thisChild ) {
|
||||
|
||||
@@ -539,6 +540,10 @@
|
||||
detailOverlay.hide();
|
||||
}
|
||||
|
||||
function handleCommitClick( evt ) {
|
||||
window.open( this.data('commit').details );
|
||||
}
|
||||
|
||||
function getXPositionForColumnNumber( columnNumber ) {
|
||||
// we want the column's center point
|
||||
return ( paper.width - ( columnNumber * cfg.columnWidth ) + (cfg.columnWidth / 2 ));
|
||||
|
||||
Reference in New Issue
Block a user