- _this = this\r
- @panel = @item.panel({with_elements: true})\r
- @panel.fetch({cache: false}).done -> # with elements\r
- _this.author = new Pettanr.Views.Show.HeaderAuthor({item: _this.panel})\r
- _this.body = new Pettanr.Views.Panel.Body({\r
- panel: _this.panel,\r
- operators: _this.operators,\r
- spot: _this.item\r
- })\r
- _this.credits = new Pettanr.Views.Panel.Show.Credits({panel: _this.panel})\r
- rb = new Tag.RowBreak()\r
- _this.$el.append(rb.render().el)\r
- _this.render()\r
+ @listenTo(this, 'ready', @ready)\r
+ @item.get_parent('panel', this, {\r
+ success: (item) =>\r
+ @panel = item.with_elements()\r
+ @panel.fetch().done =>\r
+ @panel.attributes = @panel.replaced_attributes()\r
+ @author = new Pettanr.Views.Show.HeaderAuthor({item: @panel})\r
+ @body = new Pettanr.Views.Panel.Body({\r
+ panel: @panel,\r
+ spot: @item\r
+ })\r
+ @credits = new Pettanr.Views.Common.Credits({\r
+ parent: this\r
+ })\r
+ @listenTo(@header, 'click:pick', @click_pick)\r
+ @listenTo(@header, 'click:icon', @click_show)\r
+ @listenTo(@header, 'click:caption', @click_show)\r
+ @listenTo(@header, 'click:prof', @click_prof)\r
+ @listenTo(@author, 'click:author', @click_author)\r
+ @listenTo(@credits, 'click:credit:icon', @click_credit_icon)\r
+ @trigger('ready')\r
+ })\r