challenges: list taken dynamically from scope so we can push/unshift to various task lists depending on location of add-task form. be careful with this commit, not the {{}} instead of {} - seems to be required otherwise things get weird

This commit is contained in:
Tyler Renelle
2013-05-12 13:36:30 +01:00
parent 0a37637daf
commit d28edaf30d
2 changed files with 10 additions and 5 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ module.exports.app = (appExports, model) ->
newTask = _.defaults {repeat:{su:true,m:true,t:true,w:true,th:true,f:true,s:true}, completed: false }, newTask
when 'todo'
newTask = _.defaults {completed: false }, newTask
model.unshift "_#{type}List", newTask
e.at().unshift newTask # e.at() in this case is the list, which was scoped here using {#with @list}...{/}
newModel.set ''
appExports.del = (e, el) ->