X-Git-Url: http://git.osdn.net/view?p=pettanr%2Fpettanr.git;a=blobdiff_plain;f=app%2Fassets%2Fjavascripts%2Fviews%2Fauthors%2Fshow.js.coffee;fp=app%2Fassets%2Fjavascripts%2Fviews%2Fauthors%2Fshow.js.coffee;h=b3c06c882c14c282aca0cb2f4a91e8ab6c649da2;hp=27fa31c0c90da55c81fcd70005e6cf6e51192afe;hb=e05f18d1db38e531e7bca45d4ba8db71b082402f;hpb=933bc06108ea1ea69cea90a0f411571af2c329f6 diff --git a/app/assets/javascripts/views/authors/show.js.coffee b/app/assets/javascripts/views/authors/show.js.coffee index 27fa31c0..b3c06c88 100644 --- a/app/assets/javascripts/views/authors/show.js.coffee +++ b/app/assets/javascripts/views/authors/show.js.coffee @@ -43,14 +43,18 @@ class Pettanr.Views.Author.ShowModule.PanelsBody extends Pettanr.View pager = Locmare.ListGroupModule.LibModule.Pager.factory(@list.page_status, params) _.each items, (panel) => panel = panel.play() # retake panel for 'with_elements' mode - panel.fetch({cache: false}).done => - panel.attributes = panel.decoded_attributes() - body = new Pettanr.Views.Panel.Body({ - panel: panel, - spot: null - }) - @trigger('ready', panel) - this.$el.append(body.render().el) + panel.fetch({ + success: (model, response, opt) => + panel.attributes = panel.decoded_attributes() + body = new Pettanr.Views.Panel.Body({ + panel: panel, + spot: null + }) + @trigger('ready', panel) + this.$el.append(body.render().el) + error: (item, response, opt) => + @open_error_dialog(response, opt) + }) }) this