Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
e28fb834
Commit
e28fb834
authored
Jul 15, 2016
by
Phil Hughes
Committed by
Douwe Maan
Jul 24, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed loading icon not working on resovle all buttons
parent
e7626eb0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
6 deletions
+10
-6
app/assets/javascripts/line_comments/components/resolve_all.js.coffee
...avascripts/line_comments/components/resolve_all.js.coffee
+4
-3
app/assets/javascripts/line_comments/services/resolve.js.coffee
...sets/javascripts/line_comments/services/resolve.js.coffee
+2
-2
app/assets/javascripts/line_comments/stores/comments.js.coffee
...ssets/javascripts/line_comments/stores/comments.js.coffee
+4
-1
No files found.
app/assets/javascripts/line_comments/components/resolve_all.js.coffee
View file @
e28fb834
...
...
@@ -4,16 +4,17 @@
namespace
:
String
data
:
->
comments
:
CommentsStore
.
state
loadingObject
:
CommentsStore
.
loading
computed
:
allResolved
:
->
isResolved
=
true
for
noteId
,
resolved
of
this
.
comments
[
this
.
discussionId
]
unless
noteId
is
"loading"
isResolved
=
false
unless
resolved
isResolved
=
false
unless
resolved
isResolved
buttonText
:
->
if
this
.
allResolved
then
"Un-resolve all"
else
"Resolve all"
loading
:
->
this
.
comments
[
this
.
discussionId
].
loading
loading
:
->
this
.
loadingObject
[
this
.
discussionId
]
methods
:
resolve
:
->
ResolveService
...
...
app/assets/javascripts/line_comments/services/resolve.js.coffee
View file @
e28fb834
...
...
@@ -32,7 +32,7 @@ class ResolveService
for
noteId
,
resolved
of
CommentsStore
.
state
[
discussionId
]
ids
.
push
(
noteId
)
if
resolved
is
allResolve
CommentsStore
.
state
[
discussionId
].
loading
=
true
CommentsStore
.
loading
[
discussionId
]
=
true
@
resource
.
all
({},
{
ids
:
ids
,
discussion
:
discussionId
,
resolved
:
!
allResolve
})
.
then
(
response
)
->
...
...
@@ -40,6 +40,6 @@ class ResolveService
for
noteId
in
ids
CommentsStore
.
update
(
discussionId
,
noteId
,
!
allResolve
)
CommentsStore
.
state
[
discussionId
].
loading
=
false
CommentsStore
.
loading
[
discussionId
]
=
false
@
ResolveService
=
new
ResolveService
()
app/assets/javascripts/line_comments/stores/comments.js.coffee
View file @
e28fb834
@
CommentsStore
=
state
:
{}
loading
:
{}
get
:
(
discussionId
,
noteId
)
->
this
.
state
[
discussionId
][
noteId
]
create
:
(
discussionId
,
noteId
,
resolved
)
->
unless
this
.
state
[
discussionId
]
?
Vue
.
set
(
this
.
state
,
discussionId
,
{
loading
:
false
})
Vue
.
set
(
this
.
state
,
discussionId
,
{})
Vue
.
set
(
this
.
loading
,
discussionId
,
false
)
Vue
.
set
(
this
.
state
[
discussionId
],
noteId
,
resolved
)
update
:
(
discussionId
,
noteId
,
resolved
)
->
...
...
@@ -14,3 +16,4 @@
if
Object
.
keys
(
this
.
state
[
discussionId
]).
length
is
0
Vue
.
delete
(
this
.
state
,
discussionId
)
Vue
.
delete
(
this
.
loading
,
discussionId
)
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