OSDN Git Service

change page status
[pettanr/pettanr.git] / app / assets / javascripts / models / balloon.js.coffee
index 48fb028..f1b8eab 100644 (file)
@@ -19,23 +19,22 @@ class Pettanr.Balloon extends Peta.Element
   speech_balloon: () ->\r
     new Pettanr.SpeechBalloon({id: @get('speech_balloon_id')})\r
   \r
+  system_picture: () ->\r
+    new Pettanr.SystemPicture({id: @get('system_picture_id')})\r
+  \r
   r_url: () ->\r
     '/system_pictures/' + @system_picture().filename()\r
   \r
   symbol_option: (cb) ->\r
     sb = @speech_balloon()\r
-    sb.fetch().done ->\r
+    sb.fetch({cache: true}).done ->\r
       sbt = sb.speech_balloon_template()\r
-      sbt.fetch().done ->\r
+      sbt.fetch({cache: true}).done ->\r
         sp = sbt.system_picture()\r
-        sp.fetch().done ->\r
+        sp.fetch({cache: true}).done ->\r
           cb(sp.tmb_opt_img_tag())\r
   \r
   initialize: () ->\r
     if @id\r
       @url = @url + @id\r
   \r
-class Pettanr.Balloon.Collection extends Backbone.Collection\r
-  model: Pettanr.Balloon\r
-  url: '/balloons'\r
-\r