OSDN Git Service

fix filer
[pettanr/pettanr.git] / app / assets / javascripts / routes.js.coffee
index b0c9db1..12b333d 100644 (file)
@@ -74,11 +74,18 @@ class Pettanr.Router extends Backbone.Router
       else\r
         params['action'] = 'index'\r
       this.fire(params)\r
+    this.route('', 'home')\r
     this.route(':controller/:id/:action?*query_string', 'c_i_a')\r
     this.route(':controller/:id/:action', 'c_i_a')\r
     this.route(':controller/:id?*query_string', 'c_i')\r
     this.route(':controller/:id', 'c_i')\r
   \r
+  home: () ->\r
+    params = {}\r
+    params['controller'] = 'folders'\r
+    params['action'] = 'root'\r
+    @fire(params)\r
+  \r
   hoge: () ->\r
     names = _.map Manifest.manifest().controllers, (controller_manifest, controller_name) ->\r
       c = Pettanr[Pettanr.camelize(controller_name) + 'Controller']\r