class Pettanr.Views.Balloon.Show extends Pettanr.View.Show initialize: (options) -> @header = new Pettanr.View.Show.Header(@item, this, @default_header_options()) render: () -> this.$el.html('') @item.get_parent('speech_balloon', this, { success: (@speech_balloon) => @speech_balloon.get_parent('panel', this, { success: (item) => @panel = item.play() @panel.fetch().done => @panel.attributes = @panel.decoded_attributes() @authored_by = @panel.authored_by() @body = new Pettanr.Views.Panel.Body({ panel: @panel, spot: @item }) @listenTo(@header, 'click:pick', @click_pick) @listenTo(@authored_by, 'click', @click_authored_by) this.$el.append(@header.render().el) this.$el.append(@authored_by.render().el) this.$el.append(@body.render().el) @add_credits() }) }) this click_pick: () -> @trigger('pick', @item) is_pickable: () -> true add_pick: (target_model) -> @header.add_pick(target_model)