diff --git a/app/assets/javascripts/app/pages/profile.js b/app/assets/javascripts/app/pages/profile.js index 02b353d24..8c789f382 100644 --- a/app/assets/javascripts/app/pages/profile.js +++ b/app/assets/javascripts/app/pages/profile.js @@ -12,7 +12,8 @@ app.pages.Profile = app.views.Base.extend({ }, events : { - "click #edit-mode-toggle" : "toggleEdit" + "click #edit-mode-toggle" : "toggleEdit", + "click #logout-button" : "logOutConfirm" }, tooltipSelector : "*[rel=tooltip]", @@ -49,6 +50,11 @@ app.pages.Profile = app.views.Base.extend({ this.$el.toggleClass("edit-mode") }, + logOutConfirm : function(evt) { + if(!confirm("Are you sure you want to log out?")) + evt.preventDefault(); + }, + isOwnProfile : function() { return(app.currentUser.get("guid") == this.personGUID) } diff --git a/app/assets/stylesheets/new_styles/_base.scss b/app/assets/stylesheets/new_styles/_base.scss index 934f2ebfa..8f57082de 100644 --- a/app/assets/stylesheets/new_styles/_base.scss +++ b/app/assets/stylesheets/new_styles/_base.scss @@ -472,7 +472,6 @@ div[data-template=flow] { .label { padding : 2px 5px; - padding-right : 7px; padding-bottom : 3px; span { diff --git a/app/assets/templates/profile.jst.hbs b/app/assets/templates/profile.jst.hbs index 9ee9bf424..1636383c1 100644 --- a/app/assets/templates/profile.jst.hbs +++ b/app/assets/templates/profile.jst.hbs @@ -19,6 +19,14 @@ + + {{#if isOwnProfile}} + + + + + + {{/if}}