OSDN Git Service

mrg
[pettanr/pettanr.git] / app / assets / javascripts / controllers / panels.js.coffee
index e38ce06..a645252 100644 (file)
@@ -15,14 +15,26 @@ class Pettanr.PanelsController extends Pettanr.AppController
   by_speech_balloon_template: () ->\r
     @filer_list()\r
   \r
-  show_html: () -> \r
+  show_html: () ->\r
+    _this = this\r
+    @item = new Pettanr.Panel({id: @item.get('id')}, {with_elements: true}) # retake panel for 'with_elements' mode\r
+    @item.fetch().done ->\r
+      i = new Pettanr.RelationPanel(_this.item.attributes)\r
+      view = new Pettanr.Views.Panel.Body({\r
+        el: "#pettanr",\r
+        panel: _this.item,\r
+        operators: _this.operators,\r
+        spot: null\r
+      })\r
+      view.render()\r
+      false\r
   \r
   show: () ->\r
     @set_show()\r
     switch @params['format']\r
       when 'prof'\r
         @show_prof()\r
-      when 'html'\r
+      else\r
         @show_html()\r
   \r
   count: () ->\r