Skip to content

Instantly share code, notes, and snippets.

@jiggliemon
Created February 22, 2013 23:06
Show Gist options
  • Save jiggliemon/5017300 to your computer and use it in GitHub Desktop.
Save jiggliemon/5017300 to your computer and use it in GitHub Desktop.
var Block = require('blocks/block')
var TaskModel = require('app/blocks/task')
var TaskBlock = Block.create({
template: "<input type=\"checkbox\" <%= this.model.get('doneness')?'checked':'' %>/><%= this.model.get('text') %>"
}, {
construct: function (taskId) {
this.setModel(new TaskModel(taskId))
}
})
var task = new TaskBlock('1234')
window.addEvent('domready', function () {
task.inject(document.body)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment