OSDN Git Service

fix: view
[pettanr/pettanr.git] / app / assets / javascripts / views / panel_pictures / summary.js.coffee
1 class Pettanr.Views.PanelPicture.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('picture', this, {\r
7       success: (@picture) =>\r
8         @credit = new Pettanr.View.Credit(@picture, {})\r
9         @item.get_parent('panel', this, {\r
10           success: (@panel) =>\r
11             @panel_face_button =@panel.mini_face_button({\r
12               context: this, \r
13               click: () ->\r
14                 @trigger('http_get', @panel.show_url())\r
15             })\r
16             @trigger('ready')\r
17         })\r
18     })\r
19   \r
20   render: () ->\r
21     this.$el.html('')\r
22     this.$el.append(@credit.render().el)\r
23     this.$el.append(@panel_face_button.render().el)\r
24     this\r
25   \r