OSDN Git Service

change page status
[pettanr/pettanr.git] / app / assets / javascripts / models / system_picture.js.coffee
index bd5daa6..024469d 100644 (file)
@@ -11,6 +11,9 @@ class Pettanr.SystemPicture extends Peta.SystemResource
     id: null\r
   } \r
   \r
+  picture: () ->\r
+    new Pettanr.Picture({id: @get('picture_id')})\r
+  \r
   filename: () ->\r
     @get('id') + '.' + @get('ext')\r
   \r
@@ -33,13 +36,10 @@ class Pettanr.SystemPicture extends Peta.SystemResource
   \r
   symbol_option: (cb) ->\r
     _this = this\r
-    this.fetch().done ->\r
+    this.fetch({cache: true}).done ->\r
       cb(_this.tmb_opt_img_tag())\r
   \r
   initialize: () ->\r
     if @id\r
       @url = @url + @id\r
   \r
-class Pettanr.SystemPicture.Collection extends Backbone.Collection\r
-  model: Pettanr.SystemPicture\r
-  url: '/system_pictures'\r