@item.get_parent('panel', this, {\r
success: (item) =>\r
@panel = item.play()\r
- @panel.fetch().done =>\r
- @panel.attributes = @panel.decoded_attributes()\r
- @authored_by = @panel.authored_by()\r
- @body = new Pettanr.Views.Panel.Body({\r
- panel: @panel,\r
- spot: @item\r
- })\r
- @listenTo(@header, 'click:pick', @click_pick)\r
- @listenTo(@authored_by, 'click', @click_authored_by)\r
- this.$el.append(@header.render().el)\r
- this.$el.append(@authored_by.render().el)\r
- this.$el.append(@body.render().el)\r
- @add_credits()\r
+ @panel.fetch({\r
+ success: (model, response, opt) => \r
+ @panel.attributes = @panel.decoded_attributes()\r
+ @authored_by = @panel.authored_by()\r
+ @body = new Pettanr.Views.Panel.Body({\r
+ panel: @panel,\r
+ spot: @item\r
+ })\r
+ @listenTo(@header, 'click:pick', @click_pick)\r
+ @listenTo(@authored_by, 'click', @click_authored_by)\r
+ this.$el.append(@header.render().el)\r
+ this.$el.append(@authored_by.render().el)\r
+ this.$el.append(@body.render().el)\r
+ @add_credits()\r
+ error: (item, response, opt) =>\r
+ @open_error_dialog(response, opt)\r
+ })\r
})\r
this\r
\r