OSDN Git Service

Merge branch 'v06' of git.sourceforge.jp:/gitroot/pettanr/pettanr into v06
[pettanr/pettanr.git] / app / assets / javascripts / models / speech_balloon_template.js.coffee
index 55dafaf..f802146 100644 (file)
@@ -14,13 +14,15 @@ class Pettanr.SpeechBalloonTemplate extends Peta.Template
   system_picture: () ->\r
     new Pettanr.SystemPicture({id: @get('system_picture_id')})\r
   \r
-  symbol_option: () ->\r
-    @system_picture()\r
+  symbol_option: (cb) ->\r
+    i = @system_picture()\r
+    i.fetch({cache: true}).done ->\r
+      cb(i.tmb_opt_img_tag())\r
+  \r
+  parsed_settings: () ->\r
+    JSON.parse(@get('settings'))\r
   \r
   initialize: () ->\r
     if @id\r
       @url = @url + @id\r
     \r
-class Pettanr.SpeechBalloonTemplate.Collection extends Backbone.Collection\r
-  model: Pettanr.SpeechBalloonTemplate\r
-  url: '/speech_balloon_templates'\r