Commit 818665fb authored by GitLab Bot's avatar GitLab Bot

Add latest changes from gitlab-org/gitlab@12-10-stable-ee

parent 01fa8e53
...@@ -87,9 +87,10 @@ export default class Issue { ...@@ -87,9 +87,10 @@ export default 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( // NOTE: data attribute seems unnecessary but is actually necessary
return $('.js-issuable-buttons[data-action="close-reopen"]').on(
'click', 'click',
'.js-issuable-actions a.btn-close, .js-issuable-actions a.btn-reopen', 'a.btn-close, a.btn-reopen',
e => { e => {
e.preventDefault(); e.preventDefault();
e.stopImmediatePropagation(); e.stopImmediatePropagation();
...@@ -101,10 +102,7 @@ export default class Issue { ...@@ -101,10 +102,7 @@ export default class Issue {
this.disableCloseReopenButton($button); this.disableCloseReopenButton($button);
const url = $button.data('close-reopen-url'); const url = $button.attr('href');
if (!url) {
return;
}
return axios return axios
.put(url) .put(url)
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
%a.btn.btn-default.float-right.d-block.d-sm-none.gutter-toggle.issuable-gutter-toggle.js-sidebar-toggle{ href: "#" } %a.btn.btn-default.float-right.d-block.d-sm-none.gutter-toggle.issuable-gutter-toggle.js-sidebar-toggle{ href: "#" }
= icon('angle-double-left') = 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 .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" } } %button.btn.btn-default.float-left.d-md-none.d-lg-none.d-xl-none{ type: "button", data: { toggle: "dropdown" } }
Options Options
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
.float-left.btn-group.prepend-left-10.issuable-close-dropdown.droplab-dropdown.js-issuable-close-dropdown .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), = link_to "#{display_button_action} #{display_issuable_type}", close_reopen_issuable_path(issuable),
method: button_method, class: "#{button_class} btn-#{button_action}", title: "#{display_button_action} #{display_issuable_type}", data: { 'close-reopen-url': close_reopen_issuable_path(issuable) } method: button_method, class: "#{button_class} btn-#{button_action}", title: "#{display_button_action} #{display_issuable_type}"
= button_tag type: 'button', class: "#{toggle_class} btn-#{button_action}-color", = button_tag type: 'button', class: "#{toggle_class} btn-#{button_action}-color",
data: { 'dropdown-trigger' => '#issuable-close-menu' }, 'aria-label' => 'Toggle dropdown' do data: { 'dropdown-trigger' => '#issuable-close-menu' }, 'aria-label' => 'Toggle dropdown' do
......
---
title: Fix close issue when user created the issue
merge_request: 33440
author:
type: fixed
...@@ -15,14 +15,14 @@ ...@@ -15,14 +15,14 @@
<g class="edgeLabels"></g> <g class="edgeLabels"></g>
<g class="nodes"> <g class="nodes">
<g <g
class="node js-issuable-actions btn-close clickable" class="node js-issuable-buttons btn-close clickable"
style="opacity: 1;" style="opacity: 1;"
id="A" id="A"
transform="translate(92.67500305175781,25.25)" transform="translate(92.67500305175781,25.25)"
title="click to PUT" title="click to PUT"
> >
<a <a
class="js-issuable-actions btn-close clickable" class="js-issuable-buttons btn-close clickable"
href="https://invalid" href="https://invalid"
rel="noopener" rel="noopener"
> >
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment