-class Pettanr.Views.GroundPicture.Summary extends Pettanr.Views.Common.Summary\r
+class Pettanr.Views.GroundPicture.Summary extends Pettanr.View.Summary\r
\r
initialize: (options) ->\r
super(options)\r
- @item = options.item\r
- @load()\r
- \r
- load: () ->\r
- @picture = @item.picture()\r
- @picture.fetch({cache: true}).done =>\r
- @credit = @picture.credit_view(false)\r
- panel = @item.panel()\r
- panel.fetch({cache: true}).done =>\r
- @panel_icon = new Pettanr.Views.Common.Icon({item: panel, half: true})\r
- @listenTo(@panel_icon, 'click', @panel_click)\r
- @trigger('ready')\r
\r
render: () ->\r
- this.$el.html('')\r
- this.$el.append(@credit.render().el)\r
- this.$el.append(@panel_icon.render().el)\r
+ super()\r
+ @item.get_parent('picture', this, {\r
+ success: (@picture) =>\r
+ @credit = new Pettanr.View.Credit(@picture, {icon: false})\r
+ @item.get_parent('panel', this, {\r
+ success: (@panel) =>\r
+ @panel_face_button = @panel.mini_face_button({\r
+ context: this, \r
+ click: () =>\r
+ @trigger('http_get', @panel.show_url())\r
+ })\r
+ this.$el.html('')\r
+ this.$el.append(@credit.render().el)\r
+ this.$el.append(@panel_face_button.render().el)\r
+ })\r
+ })\r
this\r
\r
- panel_click: () ->\r
- @trigger('http_get', @panel_icon.url())\r
- \r