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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
a8927a75
Commit
a8927a75
authored
Jul 04, 2016
by
Phil Hughes
Committed by
Douwe Maan
Jul 24, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed issue when adding or deleting through jQuery
parent
0ab8264e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
3 deletions
+14
-3
app/assets/javascripts/line_comments/components/resolve_btn.js.coffee
...avascripts/line_comments/components/resolve_btn.js.coffee
+1
-2
app/assets/javascripts/line_comments/stores/comments.js.coffee
...ssets/javascripts/line_comments/stores/comments.js.coffee
+2
-0
app/assets/javascripts/notes.js.coffee
app/assets/javascripts/notes.js.coffee
+10
-0
app/views/projects/notes/_note.html.haml
app/views/projects/notes/_note.html.haml
+1
-1
No files found.
app/assets/javascripts/line_comments/components/resolve_btn.js.coffee
View file @
a8927a75
...
...
@@ -19,7 +19,6 @@
compiled
:
->
$
(
this
.
$el
).
tooltip
()
destroyed
:
->
console
.
log
this
.
noteId
CommentsStore
.
delete
(
this
.
noteId
)
created
:
->
console
.
log
this
.
noteId
CommentsStore
.
create
(
this
.
noteId
,
this
.
resolved
)
app/assets/javascripts/line_comments/stores/comments.js.coffee
View file @
a8927a75
...
...
@@ -4,6 +4,8 @@
Vue
.
set
(
this
.
state
,
id
,
resolved
)
update
:
(
id
,
resolved
)
->
this
.
state
[
id
]
=
resolved
delete
:
(
id
)
->
Vue
.
delete
(
this
.
state
,
id
)
updateAll
:
(
state
)
->
for
id
,
resolved
of
this
.
state
this
.
update
(
id
,
state
)
if
resolved
isnt
state
app/assets/javascripts/notes.js.coffee
View file @
a8927a75
...
...
@@ -271,6 +271,10 @@ class @Notes
# append new note to all matching discussions
discussionContainer
.
append
note_html
if
$
(
'resolve-btn'
).
length
and
DiffNotesApp
?
$
(
'resolve-btn'
).
each
->
DiffNotesApp
.
$compile
$
(
this
).
get
(
0
)
gl
.
utils
.
localTimeAgo
(
$
(
'.js-timeago'
,
note_html
),
false
)
@
updateNotesCount
(
1
)
...
...
@@ -465,6 +469,12 @@ class @Notes
note
=
$
(
el
)
notes
=
note
.
closest
(
".notes"
)
if
DiffNotesApp
?
ref
=
DiffNotesApp
.
$refs
[
"
#{
noteId
}
"
]
if
ref
?
ref
.
$destroy
(
true
)
# check if this is the last note for this line
if
notes
.
find
(
".note"
).
length
is
1
...
...
app/views/projects/notes/_note.html.haml
View file @
a8927a75
...
...
@@ -21,7 +21,7 @@
-
if
access
and
not
note
.
system
%span
.note-role.hidden-xs
=
access
-
unless
note
.
system
%resolve-btn
{
":note-id"
=>
note
.
id
,
":resolved"
=>
"false"
,
"inline-template"
=>
true
}
%resolve-btn
{
":note-id"
=>
note
.
id
,
":resolved"
=>
"false"
,
"inline-template"
=>
true
,
"v-ref:note_#{note.id}"
=>
true
}
%button
.note-action-button.line-resolve-btn
{
type:
"button"
,
":class"
=>
"{ 'is-active': isResolved }"
,
":aria-label"
=>
"buttonText"
,
"@click"
=>
"resolve"
,
":title"
=>
"buttonText"
}
=
icon
(
"check"
)
-
if
current_user
and
not
note
.
system
...
...
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