OSDN Git Service

fix changing WithElements
[pettanr/pettanr.git] / app / assets / javascripts / controllers / balloons.js.coffee
index 62dfcda..f33d702 100644 (file)
@@ -1,6 +1,44 @@
 class Pettanr.BalloonsController extends Pettanr.AppController\r
   \r
   index: () ->\r
-    list_result = new Pettanr.Balloon.Collection({})\r
-    new Pettanr.FilerRender('balloon', list_result, 'default', window.operators)\r
+    @trigger('retitle', @params)\r
+    @filer_list()\r
   \r
+  by_author: () ->\r
+    @trigger('retitle', @params)\r
+    @filer_list()\r
+  \r
+  by_speech_balloon: () ->\r
+    @trigger('retitle', @params)\r
+    @filer_list()\r
+  \r
+  show_html: () -> \r
+    @trigger('retitle', @params)\r
+    @item.fetch({cache: true}).done =>\r
+      show = new Pettanr.Views.Balloon.Show({\r
+        item: @item,\r
+        operators: @operators\r
+      })\r
+      show.render()\r
+      @trigger('ready', show)\r
+  \r
+  show: () ->\r
+    @set_show()\r
+    switch @params['format']\r
+      when 'prof'\r
+        @show_prof()\r
+      when 'html'\r
+        @show_html()\r
+  \r
+  count: () ->\r
+  \r
+  new: () ->\r
+  \r
+  edit: () ->\r
+  \r
+  create: () ->\r
+  \r
+  update: () ->\r
+  \r
+  destroy: () ->\r
+    \r