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
a45b9e69
Commit
a45b9e69
authored
May 09, 2014
by
Randall Leeds
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1186 from hypothesis/horus-overhaul
Overhaul horus view handling
parents
eb47a5ff
68518bea
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
9 deletions
+1
-9
flash.coffee
h/js/flash.coffee
+1
-9
No files found.
h/js/flash.coffee
View file @
a45b9e69
...
@@ -44,18 +44,10 @@ flashInterceptor = ['$q', 'flash', ($q, flash) ->
...
@@ -44,18 +44,10 @@ flashInterceptor = ['$q', 'flash', ($q, flash) ->
if
format
?
.
match
/^application\/json/
if
format
?
.
match
/^application\/json/
if
data
.
flash
?
if
data
.
flash
?
for
q
,
msgs
of
data
.
flash
for
q
,
msgs
of
data
.
flash
# Workaround for horus returning the same error for
# both the username and the password field, and thus
# flashing the same error message twice
if
msgs
.
length
is
2
and
msgs
[
0
]
is
"Invalid username or password."
and
msgs
[
1
]
is
msgs
[
0
]
msgs
.
pop
()
ignoreStatus
=
true
flash
q
,
msgs
flash
q
,
msgs
if
data
.
status
is
'failure'
if
data
.
status
is
'failure'
flash
'error'
,
data
.
reason
unless
ignoreStatus
flash
'error'
,
data
.
reason
$q
.
reject
(
data
.
reason
)
$q
.
reject
(
data
.
reason
)
else
if
data
.
status
is
'okay'
and
data
.
model
else
if
data
.
status
is
'okay'
and
data
.
model
response
.
data
=
data
.
model
response
.
data
=
data
.
model
...
...
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