From 6e73d7d8f03056a674908801500a5f842aed6014 Mon Sep 17 00:00:00 2001 From: Yuval Adam Date: Mon, 29 Jun 2015 13:03:01 +0300 Subject: About buttons --- client/button.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'client/button.js') diff --git a/client/button.js b/client/button.js index 4c5eafa..3b7e936 100644 --- a/client/button.js +++ b/client/button.js @@ -229,6 +229,24 @@ Template.photo.helpers({ } }) +Template.about.events({ + 'click button.start-over': function (event) { + if (Meteor.userId()) { + Router.go('dates'); + } + else { + Router.go('login'); + } + }, + 'click button.logout': function (event) { + $('body').append('
'); + Meteor.logout(); + _.delay(function () { + Router.go('login'); + }, 500); + } +}) + Accounts.onLogin(function() { if (Router.current().route.getName() == 'login') { Router.go('dates'); -- cgit v1.3.1