OSDN Git Service

crush router and render
[pettanr/pettanr.git] / app / assets / javascripts / main.js.coffee
index 526c1ca..5f6e116 100644 (file)
@@ -25,21 +25,12 @@ $ ->
   loaded_local_manifest.init()\r
   window.operators = new Pettanr.Operator({})\r
   \r
-  r = new Pettanr.Views.Top.Index({})\r
-  $("#header").html(r.render().el)\r
-  \r
   window.onbeforeunload = (e)->\r
     return('leave?')\r
-  window.router = new Pettanr.Router()\r
   Backbone.history.start({silent: true, pushState: true, root: '/'})\r
   \r
-  # try getting current user(copy paste from users/index)\r
-  user = new Pettanr.User.Current()\r
-  user.save({}, (current_user) ->\r
-    r = new Pettanr.Views.Top.Account({operators: window.operators})\r
-    $('#account').html(r.render().el)\r
-    window.router.home()\r
-  )\r
+  layout = new Pettanr.Views.Layout.Default()\r
+  $('#pettanr').html(layout.render().el)\r
   \r
   t: () ->\r
     #i = new Pettanr.Balloon({id: 49})\r