OSDN Git Service

dd089a555b74fba95729bea0dda22d8bbbca627c
[pettanr/pettanr.git] / app / assets / javascripts / views / balloons / summary.js.coffee
1 class Pettanr.Views.Balloon.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('speech_balloon', this, {\r
9       success: (@speech_balloon) =>\r
10         @speech_balloon.get_parent('panel', this, {\r
11           success: (@panel) =>\r
12             @panel_face_button = @panel.mini_face_button({\r
13               context: this, \r
14               click: () =>\r
15                 @trigger('http_get', @panel.show_url())\r
16             })\r
17             @panel.get_parent('author', this, {\r
18               success: (@author) =>\r
19                 @author_faced_label = @author.mini_faced_label({\r
20                   context: this, \r
21                   click: () =>\r
22                     @trigger('http_get', @author.show_url())\r
23                     })\r
24                 this.$el.html('')\r
25                 this.$el.append(@panel_face_button.render().el)\r
26                 this.$el.append(@author_faced_label.render().el)\r
27             })\r
28         })\r
29     })\r
30     this\r
31   \r