OSDN Git Service

fix: views
[pettanr/pettanr.git] / app / assets / javascripts / views / resource_pictures / summary.js.coffee
index 5ae01e9..4ffdbb4 100644 (file)
@@ -2,15 +2,14 @@ class Pettanr.Views.ResourcePicture.Summary extends Pettanr.View.Summary
   \r
   initialize: (options) ->\r
     super(options)\r
-    @item = options.item\r
+  \r
+  render: () ->\r
+    super()\r
     @item.get_parent('picture', this, {\r
       success: (@picture) =>\r
-        @credit = new Pettanr.View.Credit(@picture, {})\r
-        @trigger('ready')\r
+        @credit = new Pettanr.View.Credit(@picture, {icon: false})\r
+        this.$el.html('')\r
+        this.$el.append(@credit.render().el)\r
     })\r
-  \r
-  render: () ->\r
-    this.$el.html('')\r
-    this.$el.append(@credit.render().el)\r
     this\r
   \r