diff options
| author | Yuval Adam <yuval@y3xz.com> | 2015-06-29 13:03:01 +0300 |
|---|---|---|
| committer | Yuval Adam <yuval@y3xz.com> | 2015-06-29 13:03:01 +0300 |
| commit | 6e73d7d8f03056a674908801500a5f842aed6014 (patch) | |
| tree | 8930cf7eb1eb9c0ad53e3ea81d8167b1453bfb02 /client/button.js | |
| parent | 7b35b04196c6dce495a67dbe68cd117a5cfc13d7 (diff) | |
About buttons
Diffstat (limited to 'client/button.js')
| -rw-r--r-- | client/button.js | 18 |
1 files changed, 18 insertions, 0 deletions
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('<div style="display:none;"><iframe src="https://instagram.com/accounts/logout"></iframe></div>'); + Meteor.logout(); + _.delay(function () { + Router.go('login'); + }, 500); + } +}) + Accounts.onLogin(function() { if (Router.current().route.getName() == 'login') { Router.go('dates'); |
