diff options
author | Sam Rose <samrose3@gmail.com> | 2017-02-14 21:39:11 +0300 |
---|---|---|
committer | Sam Rose <samrose3@gmail.com> | 2017-02-14 21:39:42 +0300 |
commit | 3c4dc4338484acc8736c347b5b64029450836c03 (patch) | |
tree | 5e3ed0af56b4c15085dc2a225bccfb0202d2a238 /app/controllers | |
parent | f802ad370e625e7aa2f3023f73c24a8b6f009821 (diff) |
Dispatch needed JS when creating a new MR in diff view
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/projects/application_controller.rb | 1 | ||||
-rw-r--r-- | app/controllers/projects/merge_requests_controller.rb | 3 |
2 files changed, 3 insertions, 1 deletions
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 c3e1760f168..4c981fe4e7e 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 @@ -613,6 +614,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 |