summaryrefslogtreecommitdiff
path: root/client/button.js
diff options
context:
space:
mode:
authorYuval Adam <yuval@y3xz.com>2015-07-07 12:22:38 +0300
committerYuval Adam <yuval@y3xz.com>2015-07-07 12:22:38 +0300
commite9ce70493ff75a997007a594fd47aff09da451ad (patch)
treeb80660958410e747d5b95ec5960ca1d7dcccd8a6 /client/button.js
parentf61a58a61a8606023f7aa3a296e1889c7ab4c21e (diff)
Fix logout link
Diffstat (limited to 'client/button.js')
-rw-r--r--client/button.js18
1 files 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('<div style="display:none;"><iframe src="https://instagram.com/accounts/logout"></iframe></div>');
+ 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('<div style="display:none;"><iframe src="https://instagram.com/accounts/logout"></iframe></div>');
- 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') {