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
4e86445b
Commit
4e86445b
authored
Jul 12, 2017
by
Fatih Acet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
IssueNotesRefactor: Fix issue reopen/close bug after merging from master.
parent
ddb193d0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
app/assets/javascripts/issue.js
app/assets/javascripts/issue.js
+2
-2
app/assets/javascripts/notes/components/issue_comment_form.vue
...ssets/javascripts/notes/components/issue_comment_form.vue
+3
-2
No files found.
app/assets/javascripts/issue.js
View file @
4e86445b
...
@@ -42,7 +42,7 @@ class Issue {
...
@@ -42,7 +42,7 @@ class Issue {
initIssueBtnEventListeners
()
{
initIssueBtnEventListeners
()
{
const
issueFailMessage
=
'
Unable to update this issue at this time.
'
;
const
issueFailMessage
=
'
Unable to update this issue at this time.
'
;
return
$
(
document
).
on
(
'
click
'
,
'
a.btn-close,
a.btn-reopen
'
,
(
e
)
=>
{
return
$
(
document
).
on
(
'
click
'
,
'
.issuable-actions a.btn-close, .issuable-actions
a.btn-reopen
'
,
(
e
)
=>
{
var
$button
,
shouldSubmit
,
url
;
var
$button
,
shouldSubmit
,
url
;
e
.
preventDefault
();
e
.
preventDefault
();
e
.
stopImmediatePropagation
();
e
.
stopImmediatePropagation
();
...
@@ -121,7 +121,7 @@ class Issue {
...
@@ -121,7 +121,7 @@ class Issue {
static
submitNoteForm
(
form
)
{
static
submitNoteForm
(
form
)
{
var
noteText
;
var
noteText
;
noteText
=
form
.
find
(
"
textarea.js-note-text
"
).
val
();
noteText
=
form
.
find
(
"
textarea.js-note-text
"
).
val
();
if
(
noteText
.
trim
().
length
>
0
)
{
if
(
noteText
&&
noteText
.
trim
().
length
>
0
)
{
return
form
.
submit
();
return
form
.
submit
();
}
}
}
}
...
...
app/assets/javascripts/notes/components/issue_comment_form.vue
View file @
4e86445b
...
@@ -89,7 +89,8 @@ export default {
...
@@ -89,7 +89,8 @@ export default {
// This is out of scope for the Notes Vue component.
// This is out of scope for the Notes Vue component.
// It was the shortest path to update the issue state and relevant places.
// It was the shortest path to update the issue state and relevant places.
$
(
'
.js-btn-issue-action:visible
'
).
trigger
(
'
click
'
);
const
btnClass
=
this
.
isIssueOpen
?
'
btn-reopen
'
:
'
btn-close
'
;
$
(
`.js-btn-issue-action.
${
btnClass
}
:visible`
).
trigger
(
'
click
'
);
}
}
},
},
discard
()
{
discard
()
{
...
@@ -215,7 +216,7 @@ export default {
...
@@ -215,7 +216,7 @@ export default {
</div>
</div>
<a
<a
@
click=
"handleSave(true)"
@
click=
"handleSave(true)"
:class=
"
{'btn-reopen':
issueState === 'closed', 'btn-close': issueState === 'open'
}"
:class=
"
{'btn-reopen':
!isIssueOpen, 'btn-close': isIssueOpen
}"
class="btn btn-nr btn-comment">
class="btn btn-nr btn-comment">
{{
issueActionButtonTitle
}}
{{
issueActionButtonTitle
}}
</a>
</a>
...
...
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