X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=app%2Fassets%2Fjavascripts%2Fviews%2Flicenses%2Fsummary.js.coffee;h=c3b42f5c8be09c001e1971516d0aa4ea0ab9bf72;hb=39e4dfc096bb924fec6a18186bf5df55154c9818;hp=200eccdfd5f1275fc1efebac20c48cca7a2b7a87;hpb=32ca49baa1016715d34fe862c6647da37d0ff9f8;p=pettanr%2Fpettanr.git diff --git a/app/assets/javascripts/views/licenses/summary.js.coffee b/app/assets/javascripts/views/licenses/summary.js.coffee index 200eccdf..c3b42f5c 100644 --- a/app/assets/javascripts/views/licenses/summary.js.coffee +++ b/app/assets/javascripts/views/licenses/summary.js.coffee @@ -1,10 +1,22 @@ -class Pettanr.Views.License.Summary extends Backbone.View +class Pettanr.Views.License.Summary extends Pettanr.Views.Common.Summary initialize: (options) -> super(options) + @item = options.item + @load() + + load: () -> + @system_picture = @item.system_picture() + @system_picture.fetch({cache: true}).done => + @img = new Tag.Img({ + attr: { + src: @system_picture.r_url() + } + }) + @trigger('ready') render: () -> this.$el.html('') - this.$el.append('-') + this.$el.html(@img.render().el) this