Merge branch '27920-both-wip-messages-showing' into 'master'

Dispatch needed JS when creating a new MR in diff view

Closes #27920

See merge request !9238
This commit is contained in:
Fatih Acet 2017-02-17 14:48:00 +00:00
commit de6266d650
4 changed files with 8 additions and 1 deletions

View file

@ -118,6 +118,7 @@ const ShortcutsBlob = require('./shortcuts_blob');
new gl.IssuableTemplateSelectors();
break;
case 'projects:merge_requests:new':
case 'projects:merge_requests:new_diffs':
case 'projects:merge_requests:edit':
new gl.Diff();
shortcut_handler = new ShortcutsNavigation();

View file

@ -83,7 +83,6 @@ class Projects::ApplicationController < ApplicationController
end
def apply_diff_view_cookie!
@show_changes_tab = params[:view].present?
cookies.permanent[:diff_view] = params.delete(:view) if params[:view].present?
end

View file

@ -245,6 +245,7 @@ class Projects::MergeRequestsController < Projects::ApplicationController
respond_to do |format|
format.html do
define_new_vars
@show_changes_tab = true
render "new"
end
format.json do
@ -616,6 +617,8 @@ class Projects::MergeRequestsController < Projects::ApplicationController
@labels = LabelsFinder.new(current_user, project_id: @project.id).execute
@show_changes_tab = params[:show_changes].present?
define_pipelines_vars
end

View file

@ -0,0 +1,4 @@
---
title: Dispatch needed JS when creating a new MR in diff view
merge_request:
author: