OSDN Git Service

fix: views
[pettanr/pettanr.git] / app / assets / javascripts / view / show.js.coffee
index af08756..bc1fe49 100644 (file)
@@ -58,8 +58,15 @@ class Pettanr.View.Show extends Pettanr.View
     @credits = new Pettanr.View.Credits(this, options)\r
     @listenTo(@credits, 'click:credit:icon', @click_credit_icon)\r
     this.$el.append(@credits.render().el)\r
+    @append_rb()\r
     @credits.push(@panel.licensed_pictures())\r
   \r
+  add_credit: (picture, options = {icon: true}) ->\r
+    credit = new Pettanr.View.Credit(picture, options)\r
+    this.$el.append(credit.render().el)\r
+    @listenTo(credit, 'click:icon', @click_credit_icon)\r
+    @append_rb()\r
+  \r
   click_authored_by: (author) ->\r
     @trigger('http_get', author.show_url())\r
   \r