OSDN Git Service

fix: fetch fail
[pettanr/pettanr.git] / app / assets / javascripts / view / summary / binder.js.coffee
index 0caa344..15b656c 100644 (file)
@@ -10,6 +10,8 @@ class Pettanr.View.Summary.Binder extends Pettanr.View.Summary
     @visible = new Tag.Div({\r
       content: Pettanr.AppHelper.t_selected_item(@visible_t, @item.get(@visible_column_name))\r
     })\r
+    this.$el.html('')\r
+    this.$el.append(@visible.render().el)\r
     @item.get_parent('author', this, {\r
       success: (@author) =>\r
         @author_faced_label_button = @author.mini_faced_label_button({\r
@@ -19,9 +21,11 @@ class Pettanr.View.Summary.Binder extends Pettanr.View.Summary
           click: () =>\r
             @trigger('http_get', @author.show_url())\r
         })\r
-        this.$el.html('')\r
-        this.$el.append(@visible.render().el)\r
         this.$el.append(@author_faced_label_button.render().el)\r
+      fail: (response, opt) =>\r
+        @author_faced_label_error = new Pettanr.View.MiniFacedLabelButton.Error({\r
+        })\r
+        this.$el.append(@author_faced_label_error.render().el)\r
     })\r
     this\r
   \r