fix add project cb not being used

This commit is contained in:
Radek Stepan 2014-10-24 21:05:49 -07:00
parent 11ba8ca0ea
commit 790d73187e
2 changed files with 10 additions and 26 deletions

File diff suppressed because one or more lines are too long

View File

@ -19,21 +19,14 @@ module.exports = Eventful.extend
submit: (evt, value) ->
return if key.is(evt) and not key.isEnter(evt)
[ owner, name ] = value.split('/')
done = do system.async
[ owner, name ] = value.split '/'
# Save repo.
@publish '!projects/add', { owner, name }, (err) =>
do done
@publish '!projects/add', { owner, name }
@publish '!app/notify',
'text': err or "Project #{value} saved."
'type': if err then 'error' else 'success'
# Redirect to the dashboard.
# TODO: trigger a named route
window.location.hash = '#'
# Redirect to the dashboard.
# TODO: trigger a named route
window.location.hash = '#'
onrender: ->
document.title = 'Add a new project'