OSDN Git Service

Merge branch 'v06' of git.sourceforge.jp:/gitroot/pettanr/pettanr into v06
[pettanr/pettanr.git] / app / assets / javascripts / models / panel_picture.js.coffee
index 1a86e4a..3c3003d 100644 (file)
@@ -14,8 +14,8 @@ class Pettanr.PanelPicture extends Peta.Element
   picture: () ->\r
     new Pettanr.Picture({id: @get('picture_id')})\r
   \r
-  panel: () ->\r
-    new Pettanr.Panel({id: @get('panel_id')})\r
+  panel: (options = {}) ->\r
+    new Pettanr.Panel({id: @get('panel_id')}, options)\r
   \r
   @has_picture: () ->\r
     true\r
@@ -52,14 +52,13 @@ class Pettanr.PanelPicture extends Peta.Element
   symbol_option: (cb) ->\r
     i = @picture()\r
     _this = this\r
-    i.fetch().done ->\r
+    i.fetch({cache: true}).done ->\r
       cb(_this.tmb_opt_img_tag(i))\r
   \r
+  element_face: () ->\r
+    new Pettanr.Views.PanelPicture.ElementFace({element: this})\r
+  \r
   initialize: () ->\r
     if @id\r
       @url = @url + @id\r
   \r
-class Pettanr.PanelPictures extends Backbone.Collection\r
-  model: Pettanr.PanelPicture\r
-  url: '/panel_pictures/'\r
-  \r