Skip to content

Commit

Permalink
Open in new tabs on ctrl click etc.
Browse files Browse the repository at this point in the history
Fixes #12
  • Loading branch information
tmeasday committed Oct 15, 2012
1 parent d911c49 commit 47e8022
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/client/display.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@
});

// redraw a template every X seconds
// Nice trick huh? I should put something like this in deps-extensions - T
Handlebars.registerHelper('refreshEvery', function(seconds) {
var ctx = Meteor.deps.Context.current;
if (!ctx)
Expand Down Expand Up @@ -107,13 +106,17 @@

Template.header.events = {
'click .page-header a': function(e) {
if (e.shiftKey || e.ctrlKey || e.metaKey) return true;

e.preventDefault();
Router.navigate('/', { trigger: true });
}
};

Template.content.events = {
'click a.nav-link': function(e) {
if (e.shiftKey || e.ctrlKey || e.metaKey) return true;

e.preventDefault();
var path = $(e.target).attr('href') || '';
Router.navigate(path, { trigger: true });
Expand Down

0 comments on commit 47e8022

Please sign in to comment.