OSDN Git Service

fix filer
[pettanr/pettanr.git] / app / assets / javascripts / models / original_picture.js.coffee
index bd78f92..fe1ffa9 100644 (file)
@@ -1,4 +1,6 @@
 class Pettanr.OriginalPicture extends Peta.Content\r
+  url: '/original_pictures/'\r
+  \r
   @singular: () ->\r
     'OriginalPicture'\r
   \r
@@ -29,8 +31,10 @@ class Pettanr.OriginalPicture extends Peta.Content
     wh = Pettanr.Imager.thumbnail_size(@get('width'), @get('height'))\r
     {src: @r_url(), width: wh[0], height: wh[1]}\r
   \r
-  symbol_option: () ->\r
-    @tmb_opt_img_tag()\r
+  symbol_option: (cb) ->\r
+    _this = this\r
+    this.fetch().done ->\r
+      cb(_this.tmb_opt_img_tag())\r
   \r
   revision: () ->\r
     head = @history()[0]\r