@filer_list()\r
\r
root: () ->\r
+ @set_model()\r
+ @item = new Pettanr.Folder.Root()\r
+ _this = this\r
+ @item.fetch({}).done () ->\r
+ _this.children_html()\r
\r
show_html_format: (format) -> \r
\r
+ children_html: () -> \r
+ collection = new Pettanr.Folder.Children({id: @item.get('id')})\r
+ f = new Locmare.Filer({\r
+ item_name: 'folder', \r
+ collection: collection, \r
+ pager: null, \r
+ operators: window.operators\r
+ })\r
+ $("#pettanr").html(f.render().el)\r
+ \r
show: () ->\r
console.log(@params)\r
id = @params['id']\r
- item = new Pettanr.FolderWatch({id: id})\r
+ @item = new Pettanr.FolderWatch({id: id})\r
_this = this\r
- item.fetch({}).done () ->\r
- if item.is_remote()\r
- c = item.get('controller_name')\r
- a = if Pettanr.is_blank(item.get('action_name'))\r
+ @item.fetch({}).done () ->\r
+ if _this.item.is_remote()\r
+ c = _this.item.get('controller_name')\r
+ a = if Pettanr.is_blank(_this.item.get('action_name'))\r
'index'\r
else\r
- item.get('action_name')\r
+ _this.item.get('action_name')\r
window.router['c_i'](c, a, '') # call action event in router for redirect\r
else\r
- list_result = new Pettanr.Folder.Children({id: item.id})\r
- f = new Locmare.Filer({\r
- item_name: 'folder', \r
- items: [], \r
- list_result: list_result, \r
- pager_type: 'default', \r
- operators: window.operators\r
- })\r
- $("#pettanr").html(f.render().el)\r
+ _this.children_html()\r
\r
count: () ->\r
\r