Replace el selectors with cached el usage #132

Merged
merged 1 commit into from Nov 21, 2012
@@ -4,5 +4,5 @@ class <%= view_namespace %>.<%= @action.camelize %>View extends Backbone.View
template: JST["<%= jst @action %>"]
render: ->
- $(@el).html(@template())
+ @$el.html(@template())
return this
@@ -17,7 +17,7 @@ class <%= view_namespace %>.EditView extends Backbone.View
)
render : ->
- $(@el).html(@template(@model.toJSON() ))
+ @$el.html(@template(@model.toJSON() ))
this.$("form").backboneLink(@model)
@@ -14,7 +14,7 @@ class <%= view_namespace %>.IndexView extends Backbone.View
@$("tbody").append(view.render().el)
render: =>
- $(@el).html(@template(<%= plural_model_name %>: @options.<%= plural_model_name %>.toJSON() ))
+ @$el.html(@template(<%= plural_model_name %>: @options.<%= plural_model_name %>.toJSON() ))
@addAll()
return this
@@ -15,5 +15,5 @@ class <%= view_namespace %>.<%= singular_name.camelize %>View extends Backbone.V
return false
render: ->
- $(@el).html(@template(@model.toJSON() ))
+ @$el.html(@template(@model.toJSON() ))
return this
@@ -30,7 +30,7 @@ class <%= view_namespace %>.NewView extends Backbone.View
)
render: ->
- $(@el).html(@template(@model.toJSON() ))
+ @$el.html(@template(@model.toJSON() ))
this.$("form").backboneLink(@model)
@@ -4,5 +4,5 @@ class <%= view_namespace %>.ShowView extends Backbone.View
template: JST["<%= jst 'show' %>"]
render: ->
- $(@el).html(@template(@model.toJSON() ))
+ @$el.html(@template(@model.toJSON() ))
return this
@@ -17,7 +17,7 @@ class Dummy.Views.Posts.EditView extends Backbone.View
)
render : ->
- $(@el).html(@template(@model.toJSON() ))
+ @$el.html(@template(@model.toJSON() ))
this.$("form").backboneLink(@model)
@@ -14,7 +14,7 @@ class Dummy.Views.Posts.IndexView extends Backbone.View
@$("tbody").append(view.render().el)
render: =>
- $(@el).html(@template(posts: @options.posts.toJSON() ))
+ @$el.html(@template(posts: @options.posts.toJSON() ))
@addAll()
return this
@@ -30,7 +30,7 @@ class Dummy.Views.Posts.NewView extends Backbone.View
)
render: ->
- $(@el).html(@template(@model.toJSON() ))
+ @$el.html(@template(@model.toJSON() ))
this.$("form").backboneLink(@model)
@@ -15,5 +15,5 @@ class Dummy.Views.Posts.PostView extends Backbone.View
return false
render: ->
- $(@el).html(@template(@model.toJSON() ))
+ @$el.html(@template(@model.toJSON() ))
return this
@@ -4,5 +4,5 @@ class Dummy.Views.Posts.ShowView extends Backbone.View
template: JST["backbone/templates/posts/show"]
render: ->
- $(@el).html(@template(@model.toJSON() ))
+ @$el.html(@template(@model.toJSON() ))
return this