OSDN Git Service

fix element opacity
[pettanr/pettanr.git] / app / assets / javascripts / views / panel_pictures / show.js.coffee
1 class Pettanr.Views.PanelPicture.ShowModule\r
2 class Pettanr.Views.PanelPicture.ShowModule.Header extends Pettanr.Views.Show.Header\r
3   \r
4   initialize: (options) ->\r
5     super(options)\r
6   \r
7 class Pettanr.Views.PanelPicture.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.PanelPicture.ShowModule.Header({\r
18       item: @item, \r
19       operators: @operators,\r
20       caption: @item.get('caption'), \r
21       icon_url: icon_url,\r
22       caption_url: caption_url,\r
23       prof_url: prof_url\r
24     })\r
25     _this = this\r
26     @panel = @item.panel({with_elements: true})\r
27     @panel.fetch({cache: false}).done ->  # with elements\r
28       _this.author = new Pettanr.Views.Show.HeaderAuthor({item: _this.panel})\r
29       _this.body = new Pettanr.Views.Panel.Body({\r
30         panel: _this.panel,\r
31         operators: _this.operators,\r
32         spot: _this.item\r
33       })\r
34       _this.credits = new Pettanr.Views.Panel.Show.Credits({panel: _this.panel})\r
35       rb = new Tag.RowBreak()\r
36       _this.$el.append(rb.render().el)\r
37       _this.render()\r
38   \r
39   render: () ->\r
40     this.$el.html('')\r
41     this.$el.append(@header.render().el)\r
42     this.$el.append(@author.render().el)\r
43     this.$el.append(@body.render().el)\r
44     this.$el.append(@credits.render().el)\r
45     this\r
46   \r