OSDN Git Service

fix: show's destroy button
[pettanr/pettanr.git] / app / assets / javascripts / models / scroll_panel.js.coffee
index c5d83cd..a1fcd70 100644 (file)
@@ -1,5 +1,4 @@
 class Pettanr.ScrollPanel extends Peta.Leaf\r
-  url: ''\r
   \r
   @singular: () ->\r
     'ScrollPanel'\r
@@ -21,11 +20,10 @@ class Pettanr.ScrollPanel extends Peta.Leaf
     Pettanr.Panel.licensed_pictures(panels)\r
   \r
   scroll: () ->\r
-    new Pettanr.Scroll({id: @get('scroll_id')})\r
+    new Pettanr.Cache.Retriever(Pettanr.Scroll, @get('scroll_id'))\r
   \r
   panel: () ->\r
-    # get with elm in case play mode\r
-    new Pettanr.Panel.WithElements({id: @get('panel_id')})\r
+    new Pettanr.Cache.Retriever(Pettanr.Panel, @get('panel_id'))\r
   \r
   has_panel: () ->\r
     if @get('panel_id')\r
@@ -33,7 +31,6 @@ class Pettanr.ScrollPanel extends Peta.Leaf
     else\r
       false\r
   \r
-  initialize: () ->\r
-    if @id\r
-      @url = @url + @id\r
+  initialize: (attr = {}, options = {}) ->\r
+    super(attr, options)\r
   \r