OSDN Git Service

fix sign in header
[pettanr/pettanr.git] / app / assets / javascripts / controllers / writing_formats.js.coffee
index 6e46287..f33bc55 100644 (file)
@@ -1,12 +1,23 @@
 class Pettanr.WritingFormatsController extends Pettanr.AppController\r
   \r
   index: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   by_system_picture: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   show_html: () -> \r
+    _this = this\r
+    @item.fetch({cache: true}).done ->\r
+      _this.redraw_title(_this.params, _this.item.get('caption'))\r
+      view = new Pettanr.Views.WritingFormat.Show({\r
+        el: "#pettanr",\r
+        item: _this.item,\r
+        operators: _this.operators\r
+      })\r
+      view.render()\r
   \r
   show: () ->\r
     @set_show()\r
@@ -19,9 +30,11 @@ class Pettanr.WritingFormatsController extends Pettanr.AppController
   count: () ->\r
   \r
   new: () ->\r
+    @redraw_title(@params)\r
     @form_new()\r
   \r
   edit: () ->\r
+    @redraw_title(@params)\r
     @form_edit()\r
   \r
   create: () ->\r