OSDN Git Service

fix: view system2
[pettanr/pettanr.git] / app / assets / javascripts / pettanr / file.js.coffee
index 012daf0..b6c16f1 100644 (file)
@@ -13,12 +13,15 @@ class Pettanr.ImageFile extends Pettanr.File
   height: () ->
     null
   
-  size: () ->
+  real_size: () ->
     [@width(), @height()]
   
   has_size: () ->
     @width() and @height()
   
+  tag_options: () ->
+    {}
+  
   thumbnail_size: () ->
     if @has_size()
       Pettanr.View.Image.to_thumbnail_size(@width(), @height())
@@ -34,8 +37,7 @@ class Pettanr.ImageFile extends Pettanr.File
 class Pettanr.PictureFile extends Pettanr.ImageFile
   
   constructor: (@item, subdir = null) ->
-    @filename = @item.r_url()
-    @filename += ('?subdir=' + subdir) if !_.isEmpty(subdir)
+    @filename = @item.r_url(subdir)
   
   width: () ->
     Math.abs(@item.get('width'))
@@ -43,3 +45,6 @@ class Pettanr.PictureFile extends Pettanr.ImageFile
   height: () ->
     Math.abs(@item.get('height'))
   
+  tag_options: () ->
+    {}
+