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
5b8e90dc
Commit
5b8e90dc
authored
Nov 15, 2019
by
Lee Tickett
Committed by
Tim Zallmann
Nov 15, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove var from issue js
parent
7ae80df4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
9 deletions
+11
-9
app/assets/javascripts/issue.js
app/assets/javascripts/issue.js
+6
-9
changelogs/unreleased/remove_var_from_issue_js.yml
changelogs/unreleased/remove_var_from_issue_js.yml
+5
-0
No files found.
app/assets/javascripts/issue.js
View file @
5b8e90dc
/* eslint-disable
no-var, one-var,
consistent-return */
/* eslint-disable consistent-return */
import
$
from
'
jquery
'
;
import
axios
from
'
./lib/utils/axios_utils
'
;
...
...
@@ -91,18 +91,17 @@ export default class Issue {
'
click
'
,
'
.js-issuable-actions a.btn-close, .js-issuable-actions a.btn-reopen
'
,
e
=>
{
var
$button
,
shouldSubmit
,
url
;
e
.
preventDefault
();
e
.
stopImmediatePropagation
();
$button
=
$
(
e
.
currentTarget
);
shouldSubmit
=
$button
.
hasClass
(
'
btn-comment
'
);
const
$button
=
$
(
e
.
currentTarget
);
const
shouldSubmit
=
$button
.
hasClass
(
'
btn-comment
'
);
if
(
shouldSubmit
)
{
Issue
.
submitNoteForm
(
$button
.
closest
(
'
form
'
));
}
this
.
disableCloseReopenButton
(
$button
);
url
=
$button
.
attr
(
'
href
'
);
const
url
=
$button
.
attr
(
'
href
'
);
return
axios
.
put
(
url
)
.
then
(({
data
})
=>
{
...
...
@@ -139,16 +138,14 @@ export default class Issue {
}
static
submitNoteForm
(
form
)
{
var
noteText
;
noteText
=
form
.
find
(
'
textarea.js-note-text
'
).
val
();
const
noteText
=
form
.
find
(
'
textarea.js-note-text
'
).
val
();
if
(
noteText
&&
noteText
.
trim
().
length
>
0
)
{
return
form
.
submit
();
}
}
static
initRelatedBranches
()
{
var
$container
;
$container
=
$
(
'
#related-branches
'
);
const
$container
=
$
(
'
#related-branches
'
);
return
axios
.
get
(
$container
.
data
(
'
url
'
))
.
then
(({
data
})
=>
{
...
...
changelogs/unreleased/remove_var_from_issue_js.yml
0 → 100644
View file @
5b8e90dc
---
title
:
Remove var from issue.js
merge_request
:
20098
author
:
Lee Tickett
type
:
other
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