click handlers

This commit is contained in:
Peter Cottle 2012-12-25 17:31:34 -08:00
parent 9ddfaf2f18
commit ee02aea414
6 changed files with 65 additions and 18 deletions

View file

@ -314,12 +314,13 @@ var VisNode = VisBase.extend({
},
attachClickHandlers: function() {
var commandStr = 'git show ' + this.get('commit').get('id');
var commandStr = 'git checkout ' + this.get('commit').get('id');
var Main = require('../app');
_.each([this.get('circle'), this.get('text')], function(rObj) {
rObj.click(function() {
Main.getEvents().trigger('processCommandFromEvent', commandStr);
});
$(rObj.node).css('cursor', 'pointer');
});
},