OSDN Git Service

fix event
[pettanr/pettanr.git] / app / assets / javascripts / models / original_picture.js.coffee
index 77015a3..00cf226 100644 (file)
@@ -40,18 +40,17 @@ class Pettanr.OriginalPicture extends Peta.Content
   \r
   symbol_option: () ->\r
     @fetch({cache: true}).done =>\r
-      @symbol_picture = @tmb_opt_img_tag()\r
-      @trigger('ready:symbol')\r
+      @trigger('ready:symbol', @tmb_opt_img_tag())\r
   \r
   filer_caption: () ->\r
     history = @history()\r
     history.fetch({cache: true}).done =>\r
-      @caption_text = if _.isEmpty(history.models)\r
+      caption = if _.isEmpty(history.models)\r
         'unpublished'\r
       else\r
         head = _.first(history.models)\r
         Pettanr.to_s(head.get('revision'))\r
-      @trigger('ready:caption')\r
+      @trigger('ready:caption', caption)\r
   \r
   revision: () ->\r
     new Pettanr.OriginalPicture.Head({original_picture: this})\r