fix add project cb not being used
This commit is contained in:
parent
11ba8ca0ea
commit
790d73187e
File diff suppressed because one or more lines are too long
|
@ -19,21 +19,14 @@ module.exports = Eventful.extend
|
||||||
submit: (evt, value) ->
|
submit: (evt, value) ->
|
||||||
return if key.is(evt) and not key.isEnter(evt)
|
return if key.is(evt) and not key.isEnter(evt)
|
||||||
|
|
||||||
[ owner, name ] = value.split('/')
|
[ owner, name ] = value.split '/'
|
||||||
|
|
||||||
done = do system.async
|
|
||||||
|
|
||||||
# Save repo.
|
# Save repo.
|
||||||
@publish '!projects/add', { owner, name }, (err) =>
|
@publish '!projects/add', { owner, name }
|
||||||
do done
|
|
||||||
|
|
||||||
@publish '!app/notify',
|
# Redirect to the dashboard.
|
||||||
'text': err or "Project #{value} saved."
|
# TODO: trigger a named route
|
||||||
'type': if err then 'error' else 'success'
|
window.location.hash = '#'
|
||||||
|
|
||||||
# Redirect to the dashboard.
|
|
||||||
# TODO: trigger a named route
|
|
||||||
window.location.hash = '#'
|
|
||||||
|
|
||||||
onrender: ->
|
onrender: ->
|
||||||
document.title = 'Add a new project'
|
document.title = 'Add a new project'
|
||||||
|
|
Loading…
Reference in New Issue