Permalink
Browse files

Profile view, profile model and template within index.html

  • Loading branch information...
1 parent 465c16d commit e58dbb96242032c3fd1cc85333ed160d93d53266 @zmcartor committed May 9, 2012
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -0,0 +1,23 @@
+window.Profile_view = class Profile extends Backbone.View
+
+ events:
+ 'click button#save' : 'save_profile'
+
+ initialize: ->
+ _.bindAll @
+
+ render: ->
+ @template = _.template($('#profile_template').html())
+ $(@el).html(@template(@model.toJSON()))
+
+ #go through collection of fields and set values from model to form
+ save_profile: ->
+ #serialize form values to JSON
+ # @model.set( json)
+ # save to local storage @model.save()
+
+window.Profile_model = class Profile extends Backbone.Model
+ defaults:
+ name: 'joe bob'
+ location: '51 W 5th st , Columbus, OH 43202'
+ passion: 'coffee'
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -1,4 +1,4 @@
-<script type='text/template' id='map_template'>
+<script type='text/html' id='map_template'>
<div id='map_area'>
<div id='map_route_contain'>
<form class = 'well form-inline'>

0 comments on commit e58dbb9

Please sign in to comment.