OSDN Git Service

fix event
[pettanr/pettanr.git] / app / assets / javascripts / models / resource_picture.js.coffee
index cc05204..86024e3 100644 (file)
@@ -49,10 +49,9 @@ class Pettanr.ResourcePicture extends Peta.Content
     ln = Pettanr.to_s(@license().get('caption'))\r
     lgn + '[' + ln + ']'\r
   \r
-  symbol_option: (cb) ->\r
-    _this = this\r
-    this.fetch({cache: true}).done ->\r
-      cb(_this.tmb_opt_img_tag())\r
+  symbol_option: () ->\r
+    @fetch({cache: true}).done =>\r
+      @trigger('ready:symbol', @tmb_opt_img_tag())\r
   \r
   credit_icon_view: () ->\r
     new Pettanr.Views.ResourcePicture.CreditIcon({item: this})\r