X-Git-Url: http://git.osdn.net/view?p=pettanr%2Fpettanr.git;a=blobdiff_plain;f=app%2Fassets%2Fjavascripts%2Flocmare%2Fprofiler%2Fassociation%2Fhas_many.js.coffee;fp=app%2Fassets%2Fjavascripts%2Flocmare%2Fprofiler%2Fassociation%2Fhas_many.js.coffee;h=010d851ff7dd57ed98413ba31cd2acce3e5cdbe7;hp=6d5af9217ab0d110eead66b4b89cdc8fe89e7b8f;hb=d7c8065be895b67dc453b0e11ad0f259f1ca6706;hpb=e05f18d1db38e531e7bca45d4ba8db71b082402f diff --git a/app/assets/javascripts/locmare/profiler/association/has_many.js.coffee b/app/assets/javascripts/locmare/profiler/association/has_many.js.coffee index 6d5af921..010d851f 100644 --- a/app/assets/javascripts/locmare/profiler/association/has_many.js.coffee +++ b/app/assets/javascripts/locmare/profiler/association/has_many.js.coffee @@ -18,6 +18,8 @@ class Locmare.ProfilerModule.AssociationModule.HasMany extends Pettanr.View success: (page_status) => @set_filer() @render() + fail: (response, opt) => + @open_error_dialog(response, opt) }) this @@ -45,11 +47,14 @@ class Locmare.ProfilerModule.AssociationModule.HasMany extends Pettanr.View @association.profiler add_pick: (target_model) -> - @list.open((page_status) => - @set_filer() - @render() - @filer.add_pick(target_model) - ) + @list.open(this, { + success: (page_status) => + @set_filer() + @render() + @filer.add_pick(target_model) + fail: (response, opt) => + @open_error_dialog(response, opt) + }) http_get: (url) -> @trigger('http_get', url)