From 60d60f8b49432348019b63c7e259ed77338a03e8 Mon Sep 17 00:00:00 2001 From: Michael Schmatz Date: Sun, 2 Nov 2014 19:02:48 -0500 Subject: [PATCH] Add logging out event --- app/schemas/subscriptions/auth.coffee | 2 ++ app/views/kinds/RootView.coffee | 1 + 2 files changed, 3 insertions(+) diff --git a/app/schemas/subscriptions/auth.coffee b/app/schemas/subscriptions/auth.coffee index 2c19aac0c..fc396e4c4 100644 --- a/app/schemas/subscriptions/auth.coffee +++ b/app/schemas/subscriptions/auth.coffee @@ -7,6 +7,8 @@ module.exports = 'auth:facebook-api-loaded': c.object {} 'auth:logging-in-with-facebook': c.object {} + + 'auth:logging-out': c.object {} 'auth:logged-in-with-facebook': c.object {title: 'Facebook logged in', description: 'Published when you successfully logged in with Facebook', required: ['response']}, response: diff --git a/app/views/kinds/RootView.coffee b/app/views/kinds/RootView.coffee index 7e05a2369..636a56d06 100644 --- a/app/views/kinds/RootView.coffee +++ b/app/views/kinds/RootView.coffee @@ -43,6 +43,7 @@ module.exports = class RootView extends CocoView success: (achievement) => @showNewAchievement(achievement, earnedAchievement) logoutAccount: -> + Backbone.Mediator.publish("auth:logging-out") window.tracker?.trackEvent 'Homepage', Action: 'Log Out' if @id is 'home-view' logoutUser($('#login-email').val())