OSDN Git Service

fix: fetch fail
[pettanr/pettanr.git] / app / assets / javascripts / views / speeches / summary.js.coffee
1 class Pettanr.Views.Speech.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_button = @author.mini_faced_label_button({\r
20                     shorten: true\r
21                   }, {\r
22                     context: this, \r
23                     click: () =>\r
24                       @trigger('http_get', @author.show_url())\r
25                 })\r
26                 this.$el.html('')\r
27                 this.$el.append(@panel_face_button.render().el)\r
28                 this.$el.append(@author_faced_label_button.render().el)\r
29             })\r
30         })\r
31     })\r
32     this\r
33   \r