OSDN Git Service

add load icon
[pettanr/pettanr.git] / app / assets / javascripts / views / resource_pictures / summary.js.coffee
1 class Pettanr.Views.ResourcePicture.Summary extends Pettanr.Views.Common.Summary\r
2   \r
3   initialize: (options) ->\r
4     super(options)\r
5     @item = options.item\r
6     @load()\r
7   \r
8   load: () ->\r
9     @picture = @item.picture()\r
10     @picture.fetch({cache: true}).done =>\r
11       @credit = @picture.credit_view(false)\r
12       @trigger('ready')\r
13   \r
14   render: () ->\r
15     this.$el.html('')\r
16     this.$el.append(@credit.render().el)\r
17     this\r
18   \r