initial look at indicating if user is not the owner

this does not fully work as the server does not update `isOwner` in the client when the user authenticates.
This commit is contained in:
Paul Rodwell
2016-11-30 10:29:38 +00:00
parent f7f34b2223
commit d84a282bb3
3 changed files with 10 additions and 3 deletions

View File

@ -51,7 +51,13 @@ update_footer = (ownerName, isAuthenticated) ->
$('footer > #security').empty()
if isAuthenticated
$('footer > #security').append "<a href='#' id='logout' class='footer-item' title='Sign-out'><i class='fa fa-unlock fa-lg fa-fw'></i></a>"
if isOwner
logoutTitle = "Sign-out"
logoutIconClass = ''
else
logoutTitle = "Not Owner : Sign-out"
logoutIconClass = 'notOwner'
$('footer > #security').append "<a href='#' id='logout' class='footer-item' title='#{logoutTitle}'><i class='fa fa-unlock fa-lg fa-fw #{logoutIconClass}'></i></a>"
$('footer > #security > #logout').click (e) ->
e.preventDefault()
myInit = {