OSDN Git Service

fix: view
[pettanr/pettanr.git] / app / assets / javascripts / views / speech_balloons / summary.js.coffee
1 class Pettanr.Views.SpeechBalloon.Summary extends Pettanr.View.Summary\r
2   \r
3   initialize: (options) ->\r
4     super(options)\r
5     @item = options.item\r
6     @item.get_parent('panel', this, {\r
7       success: (@panel) =>\r
8         @panel_face_button = @panel.mini_face_button({\r
9           context: this, \r
10           click: () ->\r
11             @trigger('http_get', @panel.show_url())\r
12         })\r
13         @panel.get_parent('author', this, {\r
14           success: (@author) =>\r
15             @author_faced_label = @author.mini_faced_label({\r
16               context: this, \r
17               click: () ->\r
18                 @trigger('http_get', @author.show_url())\r
19             })\r
20             @trigger('ready')\r
21         })\r
22     })\r
23   \r
24   render: () ->\r
25     this.$el.html('')\r
26     this.$el.append(@panel_face_button.render().el)\r
27     this.$el.append(@author_faced_label.render().el)\r
28     this\r
29   \r