OSDN Git Service

add load icon
[pettanr/pettanr.git] / app / assets / javascripts / views / balloons / summary.js.coffee
1 class Pettanr.Views.Balloon.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     @speech_balloon = @item.speech_balloon()\r
10     @speech_balloon.fetch({cache: true}).done =>\r
11       @panel = @speech_balloon.panel()\r
12       @panel.fetch({cache: true}).done =>\r
13         @panel_icon = new Pettanr.Views.Common.Icon({item: @panel, half: true})\r
14         @trigger('ready')\r
15   \r
16   render: () ->\r
17     this.$el.html('')\r
18     this.$el.append(@panel_icon.render().el)\r
19     this\r
20   \r