OSDN Git Service

fix: view
[pettanr/pettanr.git] / app / assets / javascripts / views / speech_balloons / summary.js.coffee
index cc212b2..89948a6 100644 (file)
@@ -5,25 +5,25 @@ class Pettanr.Views.SpeechBalloon.Summary extends Pettanr.View.Summary
     @item = options.item\r
     @item.get_parent('panel', this, {\r
       success: (@panel) =>\r
-        @panel_icon = new Pettanr.Views.Common.Icon({item: @panel, half: true})\r
-        @listenTo(@panel_icon, 'click', @panel_click)\r
+        @panel_face_button = @panel.mini_face_button({\r
+          context: this, \r
+          click: () ->\r
+            @trigger('http_get', @panel.show_url())\r
+        })\r
         @panel.get_parent('author', this, {\r
           success: (@author) =>\r
-            @author_icon_with_caption = @author.icon_with_caption_view(true, 'name', 12)\r
-            @listenTo(@author_icon_with_caption, 'click', @author_click)\r
+            @author_faced_label = @author.mini_faced_label({\r
+              context: this, \r
+              click: () ->\r
+                @trigger('http_get', @author.show_url())\r
+            })\r
             @trigger('ready')\r
         })\r
     })\r
   \r
   render: () ->\r
     this.$el.html('')\r
-    this.$el.append(@panel_icon.render().el)\r
-    this.$el.append(@author_icon_with_caption.render().el)\r
+    this.$el.append(@panel_face_button.render().el)\r
+    this.$el.append(@author_faced_label.render().el)\r
     this\r
   \r
-  panel_click: () ->\r
-    @trigger('http_get', @panel_icon.url())\r
-  \r
-  author_click: () ->\r
-    @trigger('http_get', @author_icon_with_caption.url())\r
-  \r