OSDN Git Service

fix:error dlg
authoryasushiito <yas@pen-chan.jp>
Tue, 25 Aug 2015 01:45:14 +0000 (10:45 +0900)
committeryasushiito <yas@pen-chan.jp>
Tue, 25 Aug 2015 01:45:14 +0000 (10:45 +0900)
app/assets/javascripts/editor/error/dialog.js.coffee

index 49ea6d7..961e0f7 100644 (file)
@@ -10,6 +10,8 @@ class Editor.Error.Dialog extends Editor.Dialog
         @forbidden()\r
       when 404\r
         @not_found()\r
+      else\r
+        @error()\r
     this.$el.dialog('open')\r
   \r
   render: () ->\r
@@ -36,3 +38,13 @@ class Editor.Error.Dialog extends Editor.Dialog
     this.$el.append(@div(I18n.t('yasapp.error.detail.base')).render().el)\r
     this.$el.append(@div(I18n.t('yasapp.error.detail.not_found')).render().el)\r
   \r
+  error: () ->\r
+    this.$el.html('')\r
+    this.$el.dialog({title: I18n.t('yasapp.error.caption.ajax')})\r
+    h = new Tag.H3({\r
+      content: I18n.t('yasapp.error.subject.error')\r
+    })\r
+    this.$el.append(h.render().el)\r
+    this.$el.append(@div(I18n.t('yasapp.error.detail.base')).render().el)\r
+    this.$el.append(@div(I18n.t('yasapp.error.detail.error')).render().el)\r
+  \r