OSDN Git Service

fix: views
[pettanr/pettanr.git] / app / assets / javascripts / views / speech_balloons / summary.js.coffee
index 89948a6..a5323c6 100644 (file)
@@ -2,28 +2,27 @@ class Pettanr.Views.SpeechBalloon.Summary extends Pettanr.View.Summary
   \r
   initialize: (options) ->\r
     super(options)\r
-    @item = options.item\r
+  \r
+  render: () ->\r
+    super()\r
     @item.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
-  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