OSDN Git Service

fix paginator
[pettanr/pettanr.git] / app / assets / javascripts / models / picture.js.coffee
index 2af7542..a0f42e4 100644 (file)
@@ -31,7 +31,7 @@ class Pettanr.Picture extends Peta.Content
   \r
   tmb_opt_img_tag: () ->\r
     wh = Pettanr.Imager.thumbnail_size(@get('width'), @get('height'))\r
-    {src: @r_url(), width: wh[0], height: wh[1]}\r
+    new Pettanr.AppHelperImg({src: @r_url(), size: wh[0]})\r
   \r
   tail_opt_img_tag: (img) ->\r
     {src: img, width: @get('width'), height: @get('height')}\r
@@ -45,8 +45,10 @@ class Pettanr.Picture extends Peta.Content
     ln = Pettanr.to_s(@license().get('caption'))\r
     lgn + '[' + ln + ']'\r
   \r
-  symbol_option: () ->\r
-    this\r
+  symbol_option: (cb) ->\r
+    _this = this\r
+    this.fetch().done ->\r
+      cb(_this.tmb_opt_img_tag())\r
   \r
   is_enable: () ->\r
     if @head().resource_picture()\r