OSDN Git Service

fix summary
[pettanr/pettanr.git] / app / assets / javascripts / views / licenses / summary.js.coffee
1 class Pettanr.Views.License.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     @system_picture = @item.system_picture()\r
10     @system_picture.fetch({cache: true}).done =>\r
11       @img = new Tag.Img({\r
12         attr: {\r
13           src: @system_picture.r_url()\r
14         }\r
15       })\r
16       @trigger('ready')\r
17   \r
18   render: () ->\r
19     this.$el.html('')\r
20     this.$el.html(@img.render().el)\r
21     this\r
22   \r