OSDN Git Service

d68d10f66df47cea062eaaf1d88c058b60f4a53b
[pettanr/pettanr.git] / app / assets / javascripts / views / balloons / show.js.coffee
1 class Pettanr.Views.Balloon.ShowModule\r
2 class Pettanr.Views.Balloon.ShowModule.Header extends Pettanr.Views.Show.Header\r
3   \r
4   initialize: (options) ->\r
5     super(options)\r
6   \r
7 class Pettanr.Views.Balloon.Show extends Backbone.View\r
8   tagName: 'div'\r
9   className: 'show'\r
10   \r
11   initialize: (options) ->\r
12     @item = options.item\r
13     @operators = options.operators\r
14     icon_url = Pettanr.url(@item.table_name(), 'show', {id: @item.get('id')})\r
15     caption_url = icon_url\r
16     prof_url = Pettanr.url(@item.table_name(), 'show', {id: @item.get('id'), format: 'prof'})\r
17     @header = new Pettanr.Views.Balloon.ShowModule.Header({\r
18       item: @item, \r
19       operators: @operators,\r
20       caption: '', \r
21       icon_url: icon_url,\r
22       caption_url: caption_url,\r
23       prof_url: prof_url\r
24     })\r
25   \r
26   render: () ->\r
27     this.$el.html('')\r
28     this.$el.append(@header.render().el)\r
29     this\r
30   \r