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
6739ef6c
Commit
6739ef6c
authored
May 28, 2020
by
sstern
Committed by
Paul Slaughter
May 28, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mv data attrs to parent to avoid fragility
parent
aeff667b
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
15 additions
and
12 deletions
+15
-12
app/assets/javascripts/issue.js
app/assets/javascripts/issue.js
+4
-6
app/views/projects/issues/show.html.haml
app/views/projects/issues/show.html.haml
+1
-1
app/views/shared/issuable/_close_reopen_report_toggle.html.haml
...ews/shared/issuable/_close_reopen_report_toggle.html.haml
+1
-1
changelogs/unreleased/219323-no-event-fired-at-clicking-close-issue-button-in-issue-page.yml
...nt-fired-at-clicking-close-issue-button-in-issue-page.yml
+5
-0
ee/app/views/projects/issues/_alert_blocked.html.haml
ee/app/views/projects/issues/_alert_blocked.html.haml
+2
-2
spec/frontend/fixtures/static/issue_with_mermaid_graph.html
spec/frontend/fixtures/static/issue_with_mermaid_graph.html
+2
-2
No files found.
app/assets/javascripts/issue.js
View file @
6739ef6c
...
...
@@ -100,9 +100,10 @@ export default class Issue {
initIssueBtnEventListeners
()
{
const
issueFailMessage
=
__
(
'
Unable to update this issue at this time.
'
);
return
$
(
document
).
on
(
// NOTE: data attribute seems unnecessary but is actually necessary
return
$
(
'
.js-issuable-buttons[data-action="close-reopen"]
'
).
on
(
'
click
'
,
'
.js-issuable-actions a.btn-close, .js-issuable-actions
a.btn-reopen, a.btn-close-anyway
'
,
'
a.btn-close,
a.btn-reopen, a.btn-close-anyway
'
,
e
=>
{
e
.
preventDefault
();
e
.
stopImmediatePropagation
();
...
...
@@ -119,10 +120,7 @@ export default class Issue {
}
else
{
this
.
disableCloseReopenButton
(
$button
);
const
url
=
$button
.
data
(
'
close-reopen-url
'
);
if
(
!
url
)
{
return
;
}
const
url
=
$button
.
attr
(
'
href
'
);
return
axios
.
put
(
url
)
...
...
app/views/projects/issues/show.html.haml
View file @
6739ef6c
...
...
@@ -33,7 +33,7 @@
%a
.btn.btn-default.float-right.d-block.d-sm-none.gutter-toggle.issuable-gutter-toggle.js-sidebar-toggle
{
href:
"#"
}
=
icon
(
'angle-double-left'
)
.detail-page-header-actions.js-issuable-actions
.detail-page-header-actions.js-issuable-actions
.js-issuable-buttons
{
data:
{
"action"
:
"close-reopen"
}
}
.clearfix.issue-btn-group.dropdown
%button
.btn.btn-default.float-left.d-md-none.d-lg-none.d-xl-none
{
type:
"button"
,
data:
{
toggle:
"dropdown"
}
}
Options
...
...
app/views/shared/issuable/_close_reopen_report_toggle.html.haml
View file @
6739ef6c
...
...
@@ -11,7 +11,7 @@
.float-left.btn-group.prepend-left-10.issuable-close-dropdown.droplab-dropdown.js-issuable-close-dropdown
=
link_to
"
#{
display_button_action
}
#{
display_issuable_type
}
"
,
close_reopen_issuable_path
(
issuable
),
method:
button_method
,
class:
"
#{
button_class
}
btn-
#{
button_action
}
#{
(
add_blocked_class
?
'btn-issue-blocked'
:
''
)
}
"
,
title:
"
#{
display_button_action
}
#{
display_issuable_type
}
"
,
data:
{
qa_selector:
'close_issue_button'
,
'close-reopen-url'
:
close_reopen_issuable_path
(
issuable
)
}
method:
button_method
,
class:
"
#{
button_class
}
btn-
#{
button_action
}
#{
(
add_blocked_class
?
'btn-issue-blocked'
:
''
)
}
"
,
title:
"
#{
display_button_action
}
#{
display_issuable_type
}
"
,
data:
{
qa_selector:
'close_issue_button'
}
=
button_tag
type:
'button'
,
class:
"
#{
toggle_class
}
btn-
#{
button_action
}
-color"
,
data:
{
'dropdown-trigger'
=>
'#issuable-close-menu'
},
'aria-label'
=>
_
(
'Toggle dropdown'
)
do
...
...
changelogs/unreleased/219323-no-event-fired-at-clicking-close-issue-button-in-issue-page.yml
0 → 100644
View file @
6739ef6c
---
title
:
Fix close issue when user created the issue
merge_request
:
33294
author
:
type
:
fixed
ee/app/views/projects/issues/_alert_blocked.html.haml
View file @
6739ef6c
...
...
@@ -2,7 +2,7 @@
-
blocked_by_issues_links
=
blocked_by_issues
.
map
{
|
blocking_issue
|
link_to
"
\#
#{
blocking_issue
.
iid
}
"
,
project_issue_path
(
blocking_issue
.
project
,
blocking_issue
),
class:
'gl-link'
}.
join
(
', '
).
html_safe
-
if
@issue
.
blocked?
&&
@issue
.
blocked_by_issues
(
current_user
).
length
>
0
.hidden.js-close-blocked-issue-warning.
gl-alert.gl-alert-warning.prepend-top-16
{
role:
'alert'
}
.hidden.js-close-blocked-issue-warning.
js-issuable-buttons.gl-alert.gl-alert-warning.prepend-top-16
{
role:
'alert'
,
data:
{
'action'
:
"close-reopen"
}
}
=
sprite_icon
(
'warning'
,
size:
16
,
css_class:
'gl-icon gl-alert-icon'
)
%h4
.gl-alert-title
=
_
(
'Are you sure you want to close this blocked issue?'
)
...
...
@@ -10,6 +10,6 @@
=
_
(
'This issue is currently blocked by the following issues: %{issues}.'
).
html_safe
%
{
issues:
blocked_by_issues_links
}
.gl-alert-actions
=
link_to
_
(
"Yes, close issue"
),
close_issuable_path
(
issue
),
rel:
'nofollow'
,
method:
''
,
class:
"btn btn-close-anyway gl-alert-action btn-warning btn-md gl-button"
,
title:
_
(
"Yes, close issue"
)
,
'data-close-reopen-url'
=>
close_issuable_path
(
issue
)
class:
"btn btn-close-anyway gl-alert-action btn-warning btn-md gl-button"
,
title:
_
(
"Yes, close issue"
)
%button
.btn.gl-alert-action.btn-warning.btn-md.gl-button.btn-secondary
=
s_
(
'Cancel'
)
spec/frontend/fixtures/static/issue_with_mermaid_graph.html
View file @
6739ef6c
...
...
@@ -15,14 +15,14 @@
<g
class=
"edgeLabels"
></g>
<g
class=
"nodes"
>
<g
class=
"node js-issuable-
acti
ons btn-close clickable"
class=
"node js-issuable-
butt
ons btn-close clickable"
style=
"opacity: 1;"
id=
"A"
transform=
"translate(92.67500305175781,25.25)"
title=
"click to PUT"
>
<a
class=
"js-issuable-
acti
ons btn-close clickable"
class=
"js-issuable-
butt
ons btn-close clickable"
href=
"https://invalid"
rel=
"noopener"
>
...
...
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