diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2018-01-17 12:49:11 +0300 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2018-01-17 12:49:11 +0300 |
commit | e6ddb2ee152e9a7c81c4d378f58a570ba4453606 (patch) | |
tree | 07a2efa7ccf38164e92163695f6374f4d2daa566 /app/views | |
parent | b4bc9bd5c5bedcd57e795f91f0668d7f2c622cde (diff) | |
parent | 13d70796d31c15fb5f2e7977dd137f44db354491 (diff) |
Merge branch 'merge-request-target-branch-perf' into 'master'
Improved performance of merge requests target branch dropdown
See merge request gitlab-org/gitlab-ce!16428
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/projects/merge_requests/creations/_new_submit.html.haml | 2 | ||||
-rw-r--r-- | app/views/shared/issuable/form/_branch_chooser.html.haml | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/app/views/projects/merge_requests/creations/_new_submit.html.haml b/app/views/projects/merge_requests/creations/_new_submit.html.haml index 4b5fa28078a..376ac377562 100644 --- a/app/views/projects/merge_requests/creations/_new_submit.html.haml +++ b/app/views/projects/merge_requests/creations/_new_submit.html.haml @@ -15,7 +15,7 @@ = f.hidden_field :source_project_id = f.hidden_field :source_branch = f.hidden_field :target_project_id - = f.hidden_field :target_branch + = f.hidden_field :target_branch, id: '' .mr-compare.merge-request.js-merge-request-new-submit{ 'data-mr-submit-action': "#{j params[:tab].presence || 'new'}" } - if @commits.empty? diff --git a/app/views/shared/issuable/form/_branch_chooser.html.haml b/app/views/shared/issuable/form/_branch_chooser.html.haml index 203d2adc8db..9a589387255 100644 --- a/app/views/shared/issuable/form/_branch_chooser.html.haml +++ b/app/views/shared/issuable/form/_branch_chooser.html.haml @@ -15,11 +15,10 @@ = form.label :target_branch, class: 'control-label' .col-sm-10.target-branch-select-dropdown-container .issuable-form-select-holder - = form.select(:target_branch, issuable.target_branches, - { include_blank: true }, + = form.hidden_field(:target_branch, { class: 'target_branch js-target-branch-select ref-name', disabled: issuable.new_record?, - data: { placeholder: "Select branch" }}) + data: { placeholder: "Select branch", endpoint: refs_project_path(@project, sort: 'updated_desc', find: 'branches') }}) - if issuable.new_record? = link_to 'Change branches', mr_change_branches_path(issuable) |