OSDN Git Service

Merge branch 'v06' of git.sourceforge.jp:/gitroot/pettanr/pettanr into v06
[pettanr/pettanr.git] / app / assets / javascripts / models / panel.js.coffee
index fec6673..976cd44 100644 (file)
@@ -78,9 +78,13 @@ class Pettanr.Panel.Play extends Pettanr.Panel
 class Pettanr.Panel.Edit extends Pettanr.Panel.Play\r
   \r
   load: (options) ->\r
-    @fetch().done =>\r
-      @attributes = @decoded_attributes()\r
-      @load_elements(options)\r
+    @fetch({\r
+      success: (model, response, opt) => \r
+        @attributes = @decoded_attributes()\r
+        @load_elements(options)\r
+      error: (item, response, opt) =>\r
+        options.fail.call(options.context, response, opt)\r
+    })\r
   \r
   save: (attrs) ->\r
     @url = @default_url()\r