OSDN Git Service

fix op summary
[pettanr/pettanr.git] / app / assets / javascripts / views / resource_pictures / credit.js.coffee
1 class Pettanr.Views.ResourcePicture.Credit extends Backbone.View\r
2   tagName: 'div'\r
3   className: 'credit'\r
4   \r
5   initialize: (options) ->\r
6     @item = options.item\r
7     @with_icon = options.with_icon\r
8     @url = @item.url + '/credit'\r
9   \r
10   render: () ->\r
11     this.$el.html('')\r
12     if @with_icon\r
13       p = @item.credit_icon_view()\r
14       this.$el.append(p.render().el)\r
15     _this = this\r
16     f = (data, status) ->\r
17       _this.$el.append(data)\r
18       rb = new Tag.RowBreak()\r
19       _this.$el.append(rb.render().el)\r
20     $.get(@url, null, f, 'html')\r
21     this\r
22   \r