OSDN Git Service

fix event names
[pettanr/pettanr.git] / app / assets / javascripts / controllers / pictures.js.coffee
1 class Pettanr.PicturesController extends Pettanr.AppController\r
2   \r
3   index: () ->\r
4     @trigger('title', @params)\r
5     @filer_list()\r
6   \r
7   by_artist: () ->\r
8     @trigger('title', @params)\r
9     @filer_list()\r
10   \r
11   show_html: () -> \r
12     @trigger('title', @params)\r
13     @item.fetch({cache: true}).done =>\r
14       show = new Pettanr.Views.Picture.Show({\r
15         item: @item,\r
16         operators: @operators\r
17       })\r
18       show.render()\r
19       @trigger('ready', show)\r
20   \r
21   show: () ->\r
22     @set_show()\r
23     switch @params['format']\r
24       when 'prof'\r
25         @show_prof()\r
26       when 'html'\r
27         @show_html()\r
28   \r