From e9ce70493ff75a997007a594fd47aff09da451ad Mon Sep 17 00:00:00 2001 From: Yuval Adam Date: Tue, 7 Jul 2015 12:22:38 +0300 Subject: Fix logout link --- client/button.js | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/client/button.js b/client/button.js index 93bc6c6..d4336d5 100644 --- a/client/button.js +++ b/client/button.js @@ -132,6 +132,16 @@ Template.login.events({ } }); +Template.layout.events({ + 'click a.logout': function (event) { + $('body').append('
'); + Meteor.logout(); + _.delay(function () { + Router.go('login'); + }, 500); + } +}) + Template.dates.events({ 'click input.monthOptions, click input.yearOptions': function (event) { var month = $('input[name=monthOptions]:checked').val(); @@ -204,13 +214,6 @@ Template.photos.events({ }, 'click button.share-print': function (event) { window.print(); - }, - 'click button.logout': function (event) { - $('body').append('
'); - Meteor.logout(); - _.delay(function () { - Router.go('login'); - }, 500); } }) @@ -260,7 +263,6 @@ Template.about.events({ Accounts.onLogin(function() { Meteor.call('getInstagramProfilePhoto', function(error, res) { - console.log(res); $('img.profile').attr('src', res); }); if (Router.current().route.getName() == 'login') { -- cgit v1.3.1