OSDN Git Service

redraw page title
[pettanr/pettanr.git] / app / assets / javascripts / controllers / stories.js.coffee
1 class Pettanr.StoriesController extends Pettanr.AppController\r
2   \r
3   index: () ->\r
4     @redraw_title(@params)\r
5     @filer_list()\r
6   \r
7   by_author: () ->\r
8     @redraw_title(@params)\r
9     @filer_list()\r
10   \r
11   by_comic: () ->\r
12     @redraw_title(@params)\r
13     @filer_list()\r
14   \r
15   by_sheet: () ->\r
16     @redraw_title(@params)\r
17     @filer_list()\r
18   \r
19   show_html: () -> \r
20     _this = this\r
21     @item.fetch({cache: true}).done ->\r
22       _this.redraw_title(_this.params, _this.item.get('title'))\r
23       view = new Pettanr.Views.Story.Show({\r
24         el: "#pettanr",\r
25         item: _this.item,\r
26         operators: _this.operators\r
27       })\r
28       view.render()\r
29   \r
30   show: () ->\r
31     @set_show()\r
32     switch @params['format']\r
33       when 'prof'\r
34         @show_prof()\r
35       when 'html'\r
36         @show_html()\r
37   \r
38   count: () ->\r
39   \r
40   new: () ->\r
41     @redraw_title(@params)\r
42     @form_new()\r
43   \r
44   edit: () ->\r
45     @redraw_title(@params)\r
46     @form_edit()\r
47   \r
48   create: () ->\r
49   \r
50   update: () ->\r
51   \r
52   destroy: () ->\r
53     \r