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   \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_button = @author.mini_faced_label_button({\r
18                 shorten: true\r
19               }, {\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_button.render().el)\r
27         })\r
28     })\r
29     this\r
30   \r