OSDN Git Service

fix:balloon edit
[pettanr/pettanr.git] / app / assets / javascripts / models / resource_picture.js.coffee
index eb13aef..f54e87c 100644 (file)
@@ -14,6 +14,9 @@ class Pettanr.ResourcePicture extends Peta.Content
   picture: () ->\r
     new Pettanr.Cache.Retriever(Pettanr.Picture, @get('picture_id'))\r
   \r
+  artist: () ->\r
+    new Pettanr.Cache.Retriever(Pettanr.Artist, @get('artist_id'))\r
+  \r
   is_visible: (operators = Pettanr.cache.operators) ->\r
     @is_user_visible(operators)\r
   \r
@@ -27,14 +30,16 @@ class Pettanr.ResourcePicture extends Peta.Content
     'image/' + @get('ext')\r
   \r
   r_url: (subdir = null) ->\r
-    opt = if Pettanr.to_s(@subdir).empty\r
+    opt = if _.isEmpty(subdir)\r
       ''\r
     else\r
       '?subdir=' + Pettanr.to_s(subdir)\r
     '/resource_pictures/' + @filename() + opt\r
   \r
   tmb_opt_img_tag: () ->\r
-    new Pettanr.Image.SymbolPicture({\r
+    klass = if true # thumbnail\r
+      Pettanr.Image.SymbolPicture\r
+    new klass({\r
       attr: {\r
         src: @r_url()\r
       },\r