OSDN Git Service

fix:balloon edit
[pettanr/pettanr.git] / app / assets / javascripts / views / layout.js.coffee
index 5c891df..0d984b7 100644 (file)
@@ -5,8 +5,7 @@ class Pettanr.Views.Layout.Sns extends Pettanr.Views.Layout.Base
   className: 'layout-sns'\r
   \r
   initialize: (options) ->\r
-    @operators = new Pettanr.Operator({})\r
-    @global_router = new Pettanr.GlobalRouter({operators: @operators})\r
+    @global_router = new Pettanr.GlobalRouter({})\r
     @listenTo(@global_router, 'go', @body_get)\r
     @gate = new Pettanr.BeforeUnload()\r
     @header = new Pettanr.Views.Layout.Sns.Header({parent: this})\r
@@ -29,24 +28,22 @@ class Pettanr.Views.Layout.Sns extends Pettanr.Views.Layout.Base
   init_operators: (user) ->\r
     author = new Pettanr.Author(user.get('author')) if user.get('author')\r
     artist = new Pettanr.Artist(user.get('artist')) if user.get('artist')\r
-    @operators.init({\r
+    Pettanr.cache.operators.init({\r
       user: user, \r
       author: author, \r
       artist: artist\r
     })\r
-    @global_router.operators = @operators\r
   \r
   reset_operators: () ->\r
-    @operators.init({\r
+    Pettanr.cache.operators.init({\r
       user: null, \r
       author: null, \r
       artist: null\r
     })\r
-    @global_router.operators = @operators\r
   \r
   start: () ->\r
     # check current user signed in?\r
-    proxy = new Pettanr.Proxy({operators: @operators})\r
+    proxy = new Pettanr.Proxy({})\r
     @listenTo(proxy, 'redirect', @test_redirect)\r
     # @listenTo(proxy, 'success', @test_ok)\r
     @listenTo(proxy, 'fail', @test_ng)\r
@@ -78,7 +75,7 @@ class Pettanr.Views.Layout.Sns extends Pettanr.Views.Layout.Base
     @history.disable()\r
   \r
   head_http_get: (url) ->\r
-    proxy = new Pettanr.Proxy({operators: @operators})\r
+    proxy = new Pettanr.Proxy({})\r
     @listenTo(proxy, 'ready', @head_ready)\r
     proxy.http_get(url, null)\r
   \r
@@ -88,7 +85,7 @@ class Pettanr.Views.Layout.Sns extends Pettanr.Views.Layout.Base
     @header.refresh(view)\r
   \r
   getter_proxy: () ->\r
-    proxy = new Pettanr.Proxy({operators: @operators, gate: @gate})\r
+    proxy = new Pettanr.Proxy({gate: @gate})\r
     @listenTo(proxy, 'ready', @body_ready)\r
     @listenTo(proxy, 'title', @body_title)\r
     @listenTo(proxy, 'title', @push_history)\r
@@ -123,7 +120,7 @@ class Pettanr.Views.Layout.Sns extends Pettanr.Views.Layout.Base
     $(document).attr('title', t + ' - ' + site_caption)\r
   \r
   poster_proxy: () ->\r
-    proxy = new Pettanr.Proxy({operators: @operators})\r
+    proxy = new Pettanr.Proxy({})\r
     @listenTo(proxy, 'success', @body_success)\r
     @listenTo(proxy, 'fail', @body_fail)\r
     @listenTo(proxy, 'redirect', @body_redirect)\r
@@ -170,9 +167,7 @@ class Pettanr.Views.Layout.Blog extends Pettanr.Views.Layout.Base
     @body.navigate('top/demo')\r
   \r
   sign_in_fail: (user, response) ->\r
-    view = new Pettanr.Views.UserSeeeion.New({\r
-      operators: @operators\r
-    })\r
+    view = new Pettanr.Views.UserSeeeion.New({})\r
     view.render()\r
     @body.navigate('top/demo')\r
   \r