diff options
author | Fatih Acet <acetfatih@gmail.com> | 2017-02-17 14:48:00 +0000 |
---|---|---|
committer | Fatih Acet <acetfatih@gmail.com> | 2017-02-17 14:48:00 +0000 |
commit | de6266d650dadd2d77ebf8872ba55b97c68cd971 (patch) | |
tree | 8c8c5d4e0c3ec28a86f80b81b316d7f67fb05161 | |
parent | 02443d1d41286017adfb47646be2bc88135f6415 (diff) | |
parent | 3c4dc4338484acc8736c347b5b64029450836c03 (diff) | |
download | gitlab-ce-de6266d650dadd2d77ebf8872ba55b97c68cd971.tar.gz |
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
4 files changed, 8 insertions, 1 deletions
diff --git a/app/assets/javascripts/dispatcher.js.es6 b/app/assets/javascripts/dispatcher.js.es6 index 7eec2d39a9c..f06a8848021 100644 --- a/app/assets/javascripts/dispatcher.js.es6 +++ b/app/assets/javascripts/dispatcher.js.es6 @@ -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(); diff --git a/app/controllers/projects/application_controller.rb b/app/controllers/projects/application_controller.rb index db33b60b229..e2f81b09adc 100644 --- a/app/controllers/projects/application_controller.rb +++ b/app/controllers/projects/application_controller.rb @@ -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 diff --git a/app/controllers/projects/merge_requests_controller.rb b/app/controllers/projects/merge_requests_controller.rb index 63b5bcbb586..2bf3542d089 100644 --- a/app/controllers/projects/merge_requests_controller.rb +++ b/app/controllers/projects/merge_requests_controller.rb @@ -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 diff --git a/changelogs/unreleased/27920-both-wip-messages-showing.yml b/changelogs/unreleased/27920-both-wip-messages-showing.yml new file mode 100644 index 00000000000..497fda8c8ba --- /dev/null +++ b/changelogs/unreleased/27920-both-wip-messages-showing.yml @@ -0,0 +1,4 @@ +--- +title: Dispatch needed JS when creating a new MR in diff view +merge_request: +author: |