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
77f6f0b8
Commit
77f6f0b8
authored
Jul 12, 2017
by
Fatih Acet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
IssueNotesRefactor: Listen main issue action and update note form buttons.
parent
4e86445b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
2 deletions
+9
-2
app/assets/javascripts/issue.js
app/assets/javascripts/issue.js
+1
-2
app/assets/javascripts/notes/components/issue_comment_form.vue
...ssets/javascripts/notes/components/issue_comment_form.vue
+4
-0
app/assets/javascripts/notes/components/issue_notes.vue
app/assets/javascripts/notes/components/issue_notes.vue
+4
-0
No files found.
app/assets/javascripts/issue.js
View file @
77f6f0b8
...
...
@@ -66,12 +66,11 @@ class Issue {
const
projectIssuesCounter
=
$
(
'
.issue_counter
'
);
if
(
'
id
'
in
data
)
{
$
(
document
).
trigger
(
'
issuable:change
'
);
const
isClosed
=
$button
.
hasClass
(
'
btn-close
'
);
isClosedBadge
.
toggleClass
(
'
hidden
'
,
!
isClosed
);
isOpenBadge
.
toggleClass
(
'
hidden
'
,
isClosed
);
$
(
document
).
trigger
(
'
issuable:change
'
,
isClosed
);
this
.
toggleCloseReopenButton
(
isClosed
);
let
numProjectIssues
=
Number
(
projectIssuesCounter
.
text
().
replace
(
/
[^\d]
/
,
''
));
...
...
app/assets/javascripts/notes/components/issue_comment_form.vue
View file @
77f6f0b8
...
...
@@ -122,6 +122,10 @@ export default {
this
.
markdownDocsUrl
=
markdownDocs
;
this
.
markdownPreviewUrl
=
markdownPreviewUrl
;
eventHub
.
$on
(
'
IssueStateChanged
'
,
(
isClosed
)
=>
{
this
.
issueState
=
isClosed
?
'
closed
'
:
'
reopened
'
;
});
},
};
</
script
>
...
...
app/assets/javascripts/notes/components/issue_notes.vue
View file @
77f6f0b8
...
...
@@ -88,6 +88,10 @@ export default {
new
Flash
(
'
Something went wrong on our end.
'
);
// eslint-disable-line
});
});
$
(
document
).
on
(
'
issuable:change
'
,
(
e
,
isClosed
)
=>
{
eventHub
.
$emit
(
'
IssueStateChanged
'
,
isClosed
);
});
},
checkLocationHash
()
{
const
hash
=
gl
.
utils
.
getLocationHash
();
...
...
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