Permalink
Browse files

use egg.global, not window

  • Loading branch information...
1 parent 38c0fd8 commit 4d7308b2bf11061174e6b6347211254e5d704523 Mark Evans committed Mar 28, 2012
Showing with 6 additions and 4 deletions.
  1. +3 −1 src/init.coffee
  2. +1 −1 src/view.coffee
  3. +1 −1 test/src/index.coffee
  4. +1 −1 test/src/jquery_plugins.coffee
View
@@ -1 +1,3 @@
-@egg = {}
+@egg = {
+ global: @
+}
View
@@ -81,4 +81,4 @@ class egg.View extends egg.Base
@_presenter ?= @presenterClass().create objects: @presentedObjects
presenterClass: ->
- window[@className().replace(/View$/, 'Presenter')] || egg.Presenter
+ egg.global[@className().replace(/View$/, 'Presenter')] || egg.Presenter
View
@@ -1,6 +1,6 @@
describe 'egg.Index', ->
- class window.Pea extends egg.Model
+ class Pea extends egg.Model
index = null
@@ -15,7 +15,7 @@ describe 'egg jquery plugins', ->
)
it "should namespace names with brackets yo", ->
- window.form = $("""
+ form = $("""
<form>
<input type="text" name="egg[animal]" value="monkey" />
<input type="text" name="big[bad][mineral]" value="hunkey" />

0 comments on commit 4d7308b

Please sign in to comment.