From de484b3d344038a3ea7e553f842f023e8e95e8a6 Mon Sep 17 00:00:00 2001 From: Filipa Lacerda Date: Fri, 10 Feb 2017 12:28:57 +0000 Subject: Backport of EE fix in !954 - delays the initialization of MergeRequest javascript until after DOM ready --- app/views/projects/merge_requests/_show.html.haml | 9 ++++----- changelogs/unreleased/fix-include-description-commit-message.yml | 4 ++++ 2 files changed, 8 insertions(+), 5 deletions(-) create mode 100644 changelogs/unreleased/fix-include-description-commit-message.yml diff --git a/app/views/projects/merge_requests/_show.html.haml b/app/views/projects/merge_requests/_show.html.haml index 4555b869999..07dbbb38641 100644 --- a/app/views/projects/merge_requests/_show.html.haml +++ b/app/views/projects/merge_requests/_show.html.haml @@ -115,11 +115,10 @@ = render "projects/commit/change", type: 'cherry-pick', commit: @merge_request.merge_commit, title: @merge_request.title :javascript - var merge_request; - - merge_request = new MergeRequest({ - action: "#{controller.action_name}" + $(function () { + new MergeRequest({ + action: "#{controller.action_name}" + }); }); var mrRefreshWidgetUrl = "#{mr_widget_refresh_url(@merge_request)}"; - diff --git a/changelogs/unreleased/fix-include-description-commit-message.yml b/changelogs/unreleased/fix-include-description-commit-message.yml new file mode 100644 index 00000000000..658e6360453 --- /dev/null +++ b/changelogs/unreleased/fix-include-description-commit-message.yml @@ -0,0 +1,4 @@ +--- +title: backport of EE fix !954 +merge_request: +author: -- cgit v1.2.1