OSDN Git Service

fix: fetch err
[pettanr/pettanr.git] / app / assets / javascripts / view.js.coffee
index c652f3d..f1a8a4e 100644 (file)
@@ -23,6 +23,22 @@ class Pettanr.View extends Backbone.View
     options.content = content\r
     new Tag.Span(options)\r
   \r
+  open_error_dialog: (response, options) ->\r
+    error_dialog = new Editor.Error.Dialog({parent: this})\r
+    this.$el.append(error_dialog.render().el)\r
+    error_dialog.$el.dialog({\r
+      autoOpen: false,\r
+      resizable: false,\r
+      width: 500, \r
+      height: 600,\r
+      modal: true,\r
+      buttons: {\r
+        close: () ->\r
+          $(@).dialog('close')\r
+      }\r
+    })\r
+    error_dialog.start(response, options)\r
+  \r
   @replace_empty: (caption) ->\r
     if Pettanr.is_blank(caption)\r
       empty = new Pettanr.View.EmptyDiv()\r