OSDN Git Service

add load icon
[pettanr/pettanr.git] / app / assets / javascripts / views / pictures / credit.js.coffee
1 class Pettanr.Views.Picture.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     @listenTo(@item, 'ready', @render)\r
10   \r
11   render: () ->\r
12     this.$el.html('')\r
13     if @with_icon\r
14       this.$el.append(@item.credit_icon.render().el)\r
15     this.$el.append(@item.credit)\r
16     this.$el.append((new Tag.RowBreak()).render().el)\r
17     this\r
18   \r