OSDN Git Service

fix: views
[pettanr/pettanr.git] / app / assets / javascripts / view / summary / binder.js.coffee
index 291ac05..0956877 100644 (file)
@@ -1,33 +1,25 @@
-class Pettanr.View.Summary.Binder extends Pettanr.View\r
+class Pettanr.View.Summary.Binder extends Pettanr.View.Summary\r
   \r
   initialize: (options) ->\r
     super(options)\r
-    @item = options.item\r
     @visible_t = options.visible_t\r
     @visible_column_name = options.visible_column_name\r
-    @load()\r
   \r
-  load: () ->\r
+  render: () ->\r
+    super()\r
     @visible = new Tag.Div({\r
       content: Pettanr.AppHelper.t_selected_item(@visible_t, @item.get(@visible_column_name))\r
     })\r
     @item.get_parent('author', this, {\r
       success: (@author) =>\r
         @author_mini_faced_label = @author.mini_faced_label({\r
-          context: this,\r
+          context: @context,\r
           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_mini_faced_label.render().el)\r
-        @trigger('ready')\r
     })\r
-  \r
-  render: () ->\r
-    this.$el.html('')\r
-    this.$el.append(@visible.render().el)\r
-    this.$el.append(@author_mini_faced_label.render().el)\r
     this\r
   \r
-  author_click: () ->\r
-    @trigger('http_get', @author_icon_with_caption.url())\r
-  \r