Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
coopwire-hypothesis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
孙灵跃 Leon Sun
coopwire-hypothesis
Commits
b67e28de
Commit
b67e28de
authored
Jul 23, 2014
by
Randall Leeds
Committed by
Aron Carroll
Jul 23, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Break out callbacks in auth controller
parent
6eaf2e6d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
23 deletions
+23
-23
auth.coffee
h/static/scripts/auth.coffee
+23
-23
No files found.
h/static/scripts/auth.coffee
View file @
b67e28de
...
@@ -8,22 +8,11 @@ class AuthController
...
@@ -8,22 +8,11 @@ class AuthController
constructor
:
(
$scope
,
$timeout
,
session
)
->
constructor
:
(
$scope
,
$timeout
,
session
)
->
timeout
=
null
timeout
=
null
this
.
submit
=
(
form
)
->
success
=
->
return
unless
form
.
$valid
data
=
{}
method
=
'$'
+
form
.
$name
for
own
key
of
session
delete
session
[
key
]
angular
.
extend
session
,
$scope
.
model
session
[
method
](
(
session
)
->
$scope
.
model
=
null
$scope
.
model
=
null
$scope
.
$broadcast
'success'
$scope
.
$broadcast
'success'
,
(
response
)
->
failure
=
(
form
,
response
)
->
{
errors
,
reason
}
=
response
.
data
{
errors
,
reason
}
=
response
.
data
if
reason
if
reason
...
@@ -40,7 +29,18 @@ class AuthController
...
@@ -40,7 +29,18 @@ class AuthController
form
[
field
].
responseErrorMessage
=
error
form
[
field
].
responseErrorMessage
=
error
$scope
.
$broadcast
'error'
,
form
.
$name
$scope
.
$broadcast
'error'
,
form
.
$name
)
this
.
submit
=
(
form
)
->
return
unless
form
.
$valid
data
=
{}
method
=
'$'
+
form
.
$name
for
own
key
of
session
delete
session
[
key
]
angular
.
extend
session
,
$scope
.
model
session
[
method
]
success
,
angular
.
bind
(
this
,
failure
,
form
)
$scope
.
$on
'$destroy'
,
->
$scope
.
$on
'$destroy'
,
->
if
timeout
if
timeout
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment