OSDN Git Service

fix: view
[pettanr/pettanr.git] / app / assets / javascripts / views / panel_pictures / summary.js.coffee
index 82a5e00..b8bf194 100644 (file)
@@ -1,15 +1,18 @@
-class Pettanr.Views.PanelPicture.Summary extends Pettanr.Views.Common.Summary\r
+class Pettanr.Views.PanelPicture.Summary extends Pettanr.View.Summary\r
   \r
   initialize: (options) ->\r
     super(options)\r
     @item = options.item\r
     @item.get_parent('picture', this, {\r
       success: (@picture) =>\r
-        @credit = @picture.credit_view(false)\r
+        @credit = new Pettanr.View.Credit(@picture, {})\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
             @trigger('ready')\r
         })\r
     })\r
@@ -17,9 +20,6 @@ class Pettanr.Views.PanelPicture.Summary extends Pettanr.Views.Common.Summary
   render: () ->\r
     this.$el.html('')\r
     this.$el.append(@credit.render().el)\r
-    this.$el.append(@panel_icon.render().el)\r
+    this.$el.append(@panel_face_button.render().el)\r
     this\r
   \r
-  panel_click: () ->\r
-    @trigger('http_get', @panel_icon.url())\r
-  \r