diff --git a/assets/javascripts/views/layout/path.coffee b/assets/javascripts/views/layout/path.coffee index 10d7a5e1..fb34afda 100644 --- a/assets/javascripts/views/layout/path.coffee +++ b/assets/javascripts/views/layout/path.coffee @@ -10,17 +10,21 @@ class app.views.Path extends app.View after: 'afterRoute' render: (args...) -> - @show() @html @tmpl 'path', args... + @show() + return show: -> - $.prepend $('._app'), @el unless @el.parentNode + @prependTo app.el unless @el.parentNode + return hide: -> $.remove @el if @el.parentNode + return onClick: (event) => @clicked = true if link = $.closestLink event.target, @el + return afterRoute: (route, context) => if context.type @@ -36,3 +40,4 @@ class app.views.Path extends app.View if @clicked @clicked = null app.document.sidebar.reset() + return diff --git a/assets/javascripts/views/misc/notice.coffee b/assets/javascripts/views/misc/notice.coffee index aa8c3d09..2007930e 100644 --- a/assets/javascripts/views/misc/notice.coffee +++ b/assets/javascripts/views/misc/notice.coffee @@ -19,7 +19,7 @@ class app.views.Notice extends app.View show: -> @html @tmpl("#{@type}Notice", @args...) - @prependTo $('._app') + @prependTo app.el return hide: ->