OSDN Git Service

Merge branch 'v06' of git.sourceforge.jp:/gitroot/pettanr/pettanr into v06
[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     @item = options.item\r
6     @item.get_parent('speech_balloon', this, {\r
7       success: (@speech_balloon) =>\r
8         @speech_balloon.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                 @trigger('ready')\r
23             })\r
24         })\r
25     })\r
26   \r
27   render: () ->\r
28     this.$el.html('')\r
29     this.$el.append(@panel_face_button.render().el)\r
30     this.$el.append(@author_faced_label.render().el)\r
31     this\r
32   \r