@@ -6,6 +6,7 @@ RP = React.PropTypes
6
6
moment = require ' moment'
7
7
{formatDate } = require ' ../util/blameFormatter'
8
8
errorController = require ' ../controllers/errorController'
9
+ shell = require ' shell'
9
10
10
11
HASH_LENGTH = 7 # github uses this length
11
12
BLANK_HASH = ' -' .repeat (HASH_LENGTH)
@@ -46,7 +47,7 @@ BlameLineComponent = React.createClass
46
47
a onClick : @didClickHashWithoutUrl , className : ' hash' , @props .hash .substring (0 , HASH_LENGTH)
47
48
else
48
49
url = @props .remoteRevision .url @props .hash
49
- a href : url, target : ' _blank ' , className : ' hash' , @props .hash .substring (0 , HASH_LENGTH)
50
+ a href : ' # ' , ' data-url ' : url , className : ' hash' , @props .hash .substring (0 , HASH_LENGTH)
50
51
span className : ' date' , @props .date
51
52
span className : ' committer text-highlight' ,
52
53
if @props .showOnlyLastNames
@@ -56,12 +57,16 @@ BlameLineComponent = React.createClass
56
57
57
58
componentDidMount : ->
58
59
$el = $ (@ getDOMNode ())
60
+ $ (' a' , $el).click @didClickHashWithUrl
59
61
if @props .summary
60
62
atom .tooltips .add ($el,
61
63
title : @props .summary
62
64
placement : " auto left"
63
65
)
64
66
67
+ didClickHashWithUrl : (e ) ->
68
+ e .preventDefault ()
69
+ shell .openExternal (e .target .getAttribute (' data-url' ))
65
70
66
71
componentWillUnmount : ->
67
72
$el = $ (@ getDOMNode ())
0 commit comments