From cb4e9a874502f4e89d9879eb922c544b83750947 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Fri, 20 Apr 2012 10:57:23 +0200 Subject: [PATCH] Code cleanup. --- .../javascripts/app/controllers/login.js.coffee | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/app/assets/javascripts/app/controllers/login.js.coffee b/app/assets/javascripts/app/controllers/login.js.coffee index 3628921a4..ec5f18584 100644 --- a/app/assets/javascripts/app/controllers/login.js.coffee +++ b/app/assets/javascripts/app/controllers/login.js.coffee @@ -48,22 +48,14 @@ class Index extends App.Controller login: (e) -> e.preventDefault() - e.stopPropagation(); - - @log 'submit', $(e.target) - @username = $(e.target).find('[name="username"]').val() - @password = $(e.target).find('[name="password"]').val() -# @log @username, @password + params = @formParam(e.target) # session create with login/password auth = new App.Auth auth.login( - data: { - username: @username, - password: @password, - }, + data: params, success: @success - error: @error, + error: @error, ) success: (data, status, xhr) =>