Skip to content

Instantly share code, notes, and snippets.

@lefnire
Created May 23, 2013 12:22
Show Gist options
  • Save lefnire/5635678 to your computer and use it in GitHub Desktop.
Save lefnire/5635678 to your computer and use it in GitHub Desktop.
change for task modal edit
<modal>
<input type=text value={_editingTask.text} />
<input type=date value={_editingTask.dueDate} />
...
</modal>
<task>
<a x-bind="click:taskSetEditing" data-id={:task.id}>Edit</a>
</task>
appExports.taskSetEditing = (e, el)->
model.set '_editingTask', model.at("_user.tasks."+$(el).attr('data-id'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment