-class Pettanr.Views.SpeechBalloon.Summary extends Backbone.View\r
+class Pettanr.Views.SpeechBalloon.Summary extends Pettanr.Views.Common.Summary\r
\r
initialize: (options) ->\r
+ super(options)\r
@item = options.item\r
+ @load()\r
\r
- render: () ->\r
- this.$el.html('')\r
+ load: () ->\r
panel = @item.panel()\r
panel.fetch({cache: true}).done =>\r
- panel_icon = new Pettanr.Views.Common.Icon({item: panel, half: true})\r
- this.$el.append(panel_icon.render().el)\r
+ @panel_icon = new Pettanr.Views.Common.Icon({item: panel, half: true})\r
+ @listenTo(@panel_icon, 'click', @panel_click)\r
+ author = panel.author()\r
+ author.fetch({cache: true}).done =>\r
+ @author_icon_with_caption = author.icon_with_caption_view(true, 'name', 12)\r
+ @listenTo(@author_icon_with_caption, 'click', @author_click)\r
+ @trigger('ready')\r
+ \r
+ render: () ->\r
+ this.$el.html('')\r
+ this.$el.append(@panel_icon.render().el)\r
+ this.$el.append(@author_icon_with_caption.render().el)\r
this\r
\r
+ panel_click: () ->\r
+ @trigger('http_get', @panel_icon.url())\r
+ \r
+ author_click: () ->\r
+ @trigger('http_get', @author_icon_with_caption.url())\r
+ \r