1 class Pettanr.FoldersController extends Pettanr.AppController
\r
8 @item = new Pettanr.Folder.Root()
\r
10 @item.fetch({cache: true}).done ->
\r
11 _this.children_html()
\r
13 show_html_format: (format) ->
\r
15 children_html: () ->
\r
16 collection = new Pettanr.Folder.Children({id: @item.get('id')})
\r
17 collection.fetch({cache: true}).done ->
\r
18 f = new Locmare.Filer({
\r
19 item_name: 'folder',
\r
20 items: collection.models,
\r
22 operators: window.operators
\r
24 $("#pettanr").html(f.render().el)
\r
27 console.log(@params)
\r
29 if @params['format'] == 'prof'
\r
33 @item = new Pettanr.FolderWatch({id: id})
\r
35 @item.fetch({cache: true}).done () ->
\r
36 if _this.item.is_remote()
\r
37 c = _this.item.get('controller_name')
\r
38 a = if Pettanr.is_blank(_this.item.get('action_name'))
\r
41 _this.item.get('action_name')
\r
42 window.router['c_i'](c, a, '') # call action event in router for redirect
\r
44 _this.children_html()
\r