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
c95ec812
Commit
c95ec812
authored
Feb 20, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Re-compile merge request Vue app after jQuery ajax
Closes
https://gitlab.com/gitlab-org/gitlab-ce/issues/27134
parent
e5eebeb8
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
7 deletions
+27
-7
app/assets/javascripts/merge_request_widget.js.es6
app/assets/javascripts/merge_request_widget.js.es6
+5
-0
app/assets/javascripts/merge_request_widget/ci_bundle.js.es6
app/assets/javascripts/merge_request_widget/ci_bundle.js.es6
+1
-1
app/assets/javascripts/merge_request_widget/widget_bundle.js.es6
...ets/javascripts/merge_request_widget/widget_bundle.js.es6
+17
-6
changelogs/unreleased-ee/mr-stuck-checking-fix.yml
changelogs/unreleased-ee/mr-stuck-checking-fix.yml
+4
-0
No files found.
app/assets/javascripts/merge_request_widget.js.es6
View file @
c95ec812
...
...
@@ -150,6 +150,11 @@ require('./smart_interval');
$('.mr-widget-body').replaceWith($html.find('.mr-widget-body'));
$('.mr-widget-footer').replaceWith($html.find('.mr-widget-footer'));
$('.approvals-components').replaceWith($html.find('.approvals-components'));
if (gl.compileApprovalsWidget) {
gl.compileApprovalsWidget();
}
});
};
...
...
app/assets/javascripts/merge_request_widget/ci_bundle.js.es6
View file @
c95ec812
...
...
@@ -46,7 +46,7 @@
.on('click', '.js-rebase-button', () => {
$('.js-rebase-button').html("<i class='fa fa-spinner fa-spin'></i> Rebase in progress");
});
} else
if (!$('.mr-approvals-footer').length)
{
} else {
// getMergeStatus replaces the MR widget with new, updated HTML, which means any persistent
// event management gets clobbered. When the MR is approvable, MR status is already managed
// and breaks when the DOM is clobbered.
...
...
app/assets/javascripts/merge_request_widget/widget_bundle.js.es6
View file @
c95ec812
...
...
@@ -6,11 +6,22 @@ require('./approvals/approvals_bundle');
window.gl = window.gl || {};
$(() => {
const rootEl = document.getElementById('merge-request-widget-app');
const widgetSharedStore = new gl.MergeRequestWidgetStore(rootEl);
let widgetSharedStore;
gl.MergeRequestWidgetApp = new Vue({
el: rootEl,
data: widgetSharedStore.data,
});
gl.compileApprovalsWidget = () => {
const rootEl = document.getElementById('merge-request-widget-app');
if (gl.MergeRequestWidgetApp) {
gl.MergeRequestWidgetApp.$destroy();
} else {
widgetSharedStore = new gl.MergeRequestWidgetStore(rootEl);
}
gl.MergeRequestWidgetApp = new Vue({
el: rootEl,
data: widgetSharedStore.data,
});
};
gl.compileApprovalsWidget();
});
changelogs/unreleased-ee/mr-stuck-checking-fix.yml
0 → 100644
View file @
c95ec812
---
title
:
Fixed merge request state not updating when approvals feature is active
merge_request
:
author
:
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