Skip to content

Instantly share code, notes, and snippets.

@tgriesser
Forked from alappe/gist:3143376
Created July 27, 2012 16:27
Show Gist options
  • Save tgriesser/3188993 to your computer and use it in GitHub Desktop.
Save tgriesser/3188993 to your computer and use it in GitHub Desktop.
No events…
namespace 'TimeLog.View', (exports) ->
class exports.Log extends Backbone.View
tagName: 'li'
events:
'click .date': 'lala'
template = _.template("""
<div class="date"><%= date %></div> |
<div ><%= time %></div> |
<div ><%= ticket %></div>
""")
initialize: ->
console.log 'Initialize LogView'
@model.on('change', @render, @)
render: ->
@$el.html(@template(@model.toJSON()))
this
lala: ->
console.log 'editable…'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment