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
e47f0e56
Commit
e47f0e56
authored
Jan 14, 2016
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'closing-mr-bug-fix' into 'master'
fixes bug with commenting on merge requests See merge request !2415
parents
620d8b68
1eb3e8ac
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
6 deletions
+11
-6
app/assets/javascripts/merge_request.js.coffee
app/assets/javascripts/merge_request.js.coffee
+7
-6
app/assets/javascripts/notes.js.coffee
app/assets/javascripts/notes.js.coffee
+4
-0
No files found.
app/assets/javascripts/merge_request.js.coffee
View file @
e47f0e56
...
@@ -48,14 +48,15 @@ class @MergeRequest
...
@@ -48,14 +48,15 @@ class @MergeRequest
_this
=
@
_this
=
@
$
(
'a.btn-close, a.btn-reopen'
).
on
'click'
,
(
e
)
->
$
(
'a.btn-close, a.btn-reopen'
).
on
'click'
,
(
e
)
->
$this
=
$
(
this
)
$this
=
$
(
this
)
if
$this
.
data
(
'submitted'
)
return
e
.
preventDefault
()
e
.
stopImmediatePropagation
()
shouldSubmit
=
$this
.
hasClass
(
'btn-comment'
)
shouldSubmit
=
$this
.
hasClass
(
'btn-comment'
)
console
.
log
(
"shouldSubmit"
)
if
shouldSubmit
&&
$this
.
data
(
'submitted'
)
return
if
shouldSubmit
if
shouldSubmit
_this
.
submitNoteForm
(
$this
.
closest
(
'form'
),
$this
)
if
$this
.
hasClass
(
'btn-comment-and-close'
)
||
$this
.
hasClass
(
'btn-comment-and-reopen'
)
e
.
preventDefault
()
e
.
stopImmediatePropagation
()
_this
.
submitNoteForm
(
$this
.
closest
(
'form'
),
$this
)
submitNoteForm
:
(
form
,
$button
)
=>
submitNoteForm
:
(
form
,
$button
)
=>
noteText
=
form
.
find
(
"textarea.js-note-text"
).
val
()
noteText
=
form
.
find
(
"textarea.js-note-text"
).
val
()
...
...
app/assets/javascripts/notes.js.coffee
View file @
e47f0e56
...
@@ -521,9 +521,13 @@ class @Notes
...
@@ -521,9 +521,13 @@ class @Notes
if
textarea
.
val
().
trim
().
length
>
0
if
textarea
.
val
().
trim
().
length
>
0
form
.
find
(
'.js-note-target-reopen'
).
text
(
'Comment & reopen'
)
form
.
find
(
'.js-note-target-reopen'
).
text
(
'Comment & reopen'
)
form
.
find
(
'.js-note-target-close'
).
text
(
'Comment & close'
)
form
.
find
(
'.js-note-target-close'
).
text
(
'Comment & close'
)
form
.
find
(
'.js-note-target-reopen'
).
addClass
(
'btn-comment-and-reopen'
)
form
.
find
(
'.js-note-target-close'
).
addClass
(
'btn-comment-and-close'
)
else
else
form
.
find
(
'.js-note-target-reopen'
).
text
(
'Reopen'
)
form
.
find
(
'.js-note-target-reopen'
).
text
(
'Reopen'
)
form
.
find
(
'.js-note-target-close'
).
text
(
'Close'
)
form
.
find
(
'.js-note-target-close'
).
text
(
'Close'
)
form
.
find
(
'.js-note-target-reopen'
).
removeClass
(
'btn-comment-and-reopen'
)
form
.
find
(
'.js-note-target-close'
).
removeClass
(
'btn-comment-and-close'
)
initTaskList
:
->
initTaskList
:
->
@
enableTaskList
()
@
enableTaskList
()
...
...
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