@operators = options.operators\r
@author = @operators.author\r
@artist = @operators.artist\r
+ \r
+ render: () ->\r
+ this.$el.html('')\r
+ @logo = new Pettanr.Views.Common.Logo({})\r
+ @listenTo(@logo, 'click', @logo_click)\r
+ this.$el.append(@logo.render().el)\r
if @author\r
@author_view = @author.icon_with_caption_view()\r
@listenTo(@author_view, 'click', @author_click)\r
+ this.$el.append(@author_view.render().el)\r
if @artist\r
@artist_view = @artist.icon_with_caption_view()\r
@listenTo(@artist_view, 'click', @artist_click)\r
- \r
- render: () ->\r
- this.$el.html('')\r
- if @author_view\r
- this.$el.append(@author_view.render().el)\r
- if @artist_view\r
this.$el.append(@artist_view.render().el)\r
sign_out = new Tag.A({\r
attr: {href: '/users/sign_out'}, \r
class_name: 'sign_out', \r
content: 'sign out'\r
})\r
+ @listenTo(sign_out, 'click', @sign_out_click)\r
this.$el.append(sign_out.render().el)\r
- @delegateEvents({'click .sign_out': 'sign_out'})\r
this\r
\r
+ logo_click: () ->\r
+ @trigger('http_get', '')\r
+ \r
author_click: () ->\r
- @trigger('navigate', @author_view.url())\r
+ @trigger('http_get', @author_view.url())\r
\r
artist_click: () ->\r
- @trigger('navigate', @artist_view.url())\r
+ @trigger('http_get', @artist_view.url())\r
\r
- sign_out: () ->\r
- @trigger('navigate', 'users/sign_out')\r
+ sign_out_click: () ->\r
+ @trigger('http_post', 'users/sign_out')\r
return false\r
\r