OSDN Git Service

a5323c600c7654e35ad3847a9c6ab47d6087f7be
[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   \r
6   render: () ->\r
7     super()\r
8     @item.get_parent('panel', this, {\r
9       success: (@panel) =>\r
10         @panel_face_button = @panel.mini_face_button({\r
11           context: this, \r
12           click: () =>\r
13             @trigger('http_get', @panel.show_url())\r
14         })\r
15         @panel.get_parent('author', this, {\r
16           success: (@author) =>\r
17             @author_faced_label = @author.mini_faced_label({\r
18               context: this, \r
19               click: () =>\r
20                 @trigger('http_get', @author.show_url())\r
21             })\r
22             this.$el.html('')\r
23             this.$el.append(@panel_face_button.render().el)\r
24             this.$el.append(@author_faced_label.render().el)\r
25         })\r
26     })\r
27     this\r
28   \r