OSDN Git Service

fix editor
[pettanr/pettanr.git] / app / assets / javascripts / views / ground_pictures / summary.js.coffee
1 class Pettanr.Views.GroundPicture.Summary extends Backbone.View\r
2   \r
3   initialize: (options) ->\r
4     @item = options.item\r
5     @picture = @item.picture()\r
6   \r
7   render: () ->\r
8     this.$el.html('')\r
9     _this = this\r
10     @picture.fetch({cache: true}).done ->\r
11       credit = _this.picture.credit_view(false)\r
12       _this.$el.append(credit.render().el)\r
13       panel = _this.item.panel()\r
14       panel.fetch({cache: true}).done ->\r
15         panel_icon = new Pettanr.Views.Common.Icon({item: panel, half: true})\r
16         _this.$el.append(panel_icon.render().el)\r
17     this\r
18   \r