OSDN Git Service

fix: views
[pettanr/pettanr.git] / app / assets / javascripts / views / speeches / summary.js.coffee
index aab236a..eb6aa3e 100644 (file)
@@ -2,31 +2,30 @@ class Pettanr.Views.Speech.Summary extends Pettanr.View.Summary
   \r
   initialize: (options) ->\r
     super(options)\r
-    @item = options.item\r
+  \r
+  render: () ->\r
+    super()\r
     @item.get_parent('speech_balloon', this, {\r
       success: (@speech_balloon) =>\r
         @speech_balloon.get_parent('panel', this, {\r
           success: (@panel) =>\r
             @panel_face_button = @panel.mini_face_button({\r
               context: this, \r
-              click: () ->\r
+              click: () =>\r
                 @trigger('http_get', @panel.show_url())\r
             })\r
             @panel.get_parent('author', this, {\r
               success: (@author) =>\r
                 @author_faced_label = @author.mini_faced_label({\r
                   context: this, \r
-                  click: () ->\r
+                  click: () =>\r
                     @trigger('http_get', @author.show_url())\r
                 })\r
-                @trigger('ready')\r
+                this.$el.html('')\r
+                this.$el.append(@panel_face_button.render().el)\r
+                this.$el.append(@author_faced_label.render().el)\r
             })\r
         })\r
     })\r
-  \r
-  render: () ->\r
-    this.$el.html('')\r
-    this.$el.append(@panel_face_button.render().el)\r
-    this.$el.append(@author_faced_label.render().el)\r
     this\r
   \r