Code cleanup.

This commit is contained in:
Martin Edenhofer 2012-04-20 10:57:23 +02:00
parent 8ef89f0635
commit cb4e9a8745

View file

@ -48,22 +48,14 @@ class Index extends App.Controller
login: (e) -> login: (e) ->
e.preventDefault() e.preventDefault()
e.stopPropagation(); params = @formParam(e.target)
@log 'submit', $(e.target)
@username = $(e.target).find('[name="username"]').val()
@password = $(e.target).find('[name="password"]').val()
# @log @username, @password
# session create with login/password # session create with login/password
auth = new App.Auth auth = new App.Auth
auth.login( auth.login(
data: { data: params,
username: @username,
password: @password,
},
success: @success success: @success
error: @error, error: @error,
) )
success: (data, status, xhr) => success: (data, status, xhr) =>