logout button on your profile [ci skip]
This commit is contained in:
parent
9a547b8161
commit
accd507f36
3 changed files with 15 additions and 2 deletions
|
|
@ -12,7 +12,8 @@ app.pages.Profile = app.views.Base.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
events : {
|
events : {
|
||||||
"click #edit-mode-toggle" : "toggleEdit"
|
"click #edit-mode-toggle" : "toggleEdit",
|
||||||
|
"click #logout-button" : "logOutConfirm"
|
||||||
},
|
},
|
||||||
|
|
||||||
tooltipSelector : "*[rel=tooltip]",
|
tooltipSelector : "*[rel=tooltip]",
|
||||||
|
|
@ -49,6 +50,11 @@ app.pages.Profile = app.views.Base.extend({
|
||||||
this.$el.toggleClass("edit-mode")
|
this.$el.toggleClass("edit-mode")
|
||||||
},
|
},
|
||||||
|
|
||||||
|
logOutConfirm : function(evt) {
|
||||||
|
if(!confirm("Are you sure you want to log out?"))
|
||||||
|
evt.preventDefault();
|
||||||
|
},
|
||||||
|
|
||||||
isOwnProfile : function() {
|
isOwnProfile : function() {
|
||||||
return(app.currentUser.get("guid") == this.personGUID)
|
return(app.currentUser.get("guid") == this.personGUID)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -472,7 +472,6 @@ div[data-template=flow] {
|
||||||
|
|
||||||
.label {
|
.label {
|
||||||
padding : 2px 5px;
|
padding : 2px 5px;
|
||||||
padding-right : 7px;
|
|
||||||
padding-bottom : 3px;
|
padding-bottom : 3px;
|
||||||
|
|
||||||
span {
|
span {
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,14 @@
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
{{#if isOwnProfile}}
|
||||||
|
<a href="/users/sign_out" title="Log out" id="logout-button">
|
||||||
|
<span class="label label-inverse">
|
||||||
|
<i class="icon-off icon-white"></i>
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue