OSDN Git Service

fix profiler
[pettanr/pettanr.git] / app / assets / javascripts / controllers / scrolls.js.coffee
index 7ccf95f..341d1df 100644 (file)
@@ -9,13 +9,15 @@ class Pettanr.ScrollsController extends Pettanr.AppController
   by_panel: () ->\r
     @filer_list()\r
   \r
+  show_html: () -> \r
+  \r
   show: (params) ->\r
-    console.log(params)\r
-    id = params['id']\r
-    item = new Pettanr.Scroll({id: id})\r
-    _this = this\r
-    item.fetch({}).done () ->\r
-      alert(item)\r
+    @set_show()\r
+    switch @params['format']\r
+      when 'prof'\r
+        @show_prof()\r
+      when 'html'\r
+        @show_html()\r
   \r
   count: (params) ->\r
   \r