Created
February 22, 2013 23:06
-
-
Save jiggliemon/5017300 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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